Giter Site home page Giter Site logo

adaptiveapplications / carnegie Goto Github PK

View Code? Open in Web Editor NEW
0.0 4.0 1.0 16.76 MB

civics

License: MIT License

Python 26.67% Makefile 2.13% HTML 0.03% CSS 0.49% JavaScript 0.05% PureBasic 0.38% C 47.15% C++ 16.51% Fortran 0.02% Roff 0.01% Shell 3.30% M4 0.10% Vim Script 0.01% Emacs Lisp 0.02% Java 3.07% CMake 0.04% Batchfile 0.01%
opendataday opendata civic-tech civic-hacking civic-apps louisville

carnegie's Introduction

Amazon Developer (Alexa) accounts

AWS accounts

  • Everyone has an IAM account that is your first name
  • Please login and change your password -> https://165284110550.signin.aws.amazon.com/console
  • Summary of groups, roles, and roles is below. If you feel that you need additional permissions or to another user with a specific set of permissions, please post it on slack
    • alexa (role) has RDSFullAccess, LambdaFullAccess, S3FullAccess
    • lambda (role) has RDSFullAccess
    • Developers (group) has RDSFullAccess, EC2FullAccess, LambdaFullAccess, S3FullAccess

Build Lambda NodeJS

  1. Create a zip archive containing *.js and the entire node_modules directory.
  2. Upload the zip archive to the Lambda dev console.
  3. Profit.

Geolocation Accounts

Python setup (v2.7)

$ pip install numpy
$ pip install quantities
$ pip install geopy
$ pip install Geocoder

$ python gtfs_realtime_client.py <POLL INTERVAL> <BUS NUMBER> <MAX BUSES>

Python setup (v3.*)

$ pip3 install pymsql
$ pip install requests

$ python3 louisvillekygov-to-awscivicdata.py

Package
$ conda install virtualenv
$ virtualenv ./carnegie-ve
$ pip install carnegie-ve pymysql
$ cd carnegie-ve/lib/python3.6/site-packages
$ zip -r -X "carnegie-ve.zip" ./*

Scott's Journey (on a Mac, using homebrew)
$ brew install python3
$ brew link --overwrite python3  # run 'brew link python3' to see warnings
$ python3 -m venv ./carnegie-ve  # create new virtualenv (built-in to 3.6)
$ source carnegie-ve/bin/activate
$ python -m pip install pymysql
$ https://docs.python.org/3/installing/index.html

Upload the zip to AWS Lambda for testing

#Redis and EC2 ssh [email protected] -i ssh-ec2-pair.pem cd redis-stable redis-stable]$ src/redis-cli -c -h incident-cache.aqsren.ng.0001.use1.cache.amazonaws.com -p 6379

Notes and Tools

carnegie's People

Contributors

ajdrake avatar bretwalker avatar essaredee avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

bretwalker

carnegie's Issues

Scott's Permissions

@ajdrake
My AWS account for AA doesn't have permissions to create the new ElastiCache/Redis instance. I'm happy to do it if you want to alter my permissions or provide service account credentials.

memory usage too high for lambda

03:23:02
START RequestId: 1ebf1b01-c8eb-11e7-9aaa-2dcc1045648d Version: $LATEST

03:23:02
Execution for 2017-11-14 03:23:02.042031

03:23:02
lambda started

03:23:02
aws

03:23:02
Retrieving input file...

03:23:02
http://lky-open-data.s3.amazonaws.com/LMPD/Crime_Data_2017.csv

03:23:02
INPUT_FILE retrieved

03:23:08
END RequestId: 1ebf1b01-c8eb-11e7-9aaa-2dcc1045648d

03:23:08
REPORT RequestId: 1ebf1b01-c8eb-11e7-9aaa-2dcc1045648d Duration: 6487.61 ms Billed Duration: 6500 ms Memory Size: 128 MB Max Memory Used: 128 MB

03:23:08
RequestId: 1ebf1b01-c8eb-11e7-9aaa-2dcc1045648d Process exited before completing request

Data sync script

script should pull the latest civic data csv file, and post it to the mysql database

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.