Code Monkey home page Code Monkey logo

mapping's People

Contributors

millzpaugh avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

mapbox

mapping's Issues

Store data in MongoDB

We plan to use MongoDB as the data dump store to contain all RapidPro user data.

Next Actions

  • Setup locally first
  • Setup in Docker container locally
  • Setup EC2/Docker container to access RDS that contains the MongoDB (RDS url as env var within EC2)

cc @millzpaugh

Add congressional district codes

We need Congressional District codes in order to match each district on the map with proper features/polygon.

Next actions

  • Create a script to add Congressional Districts to rep_by_state.json data, using the google civic api Sunlight Foundation API to lookup congressional districts by rep
  • Add this rep_by_state.json data file to this repo for CD lookup by state

Available geo data

Congressional District shapefile

  1. Convert shapefile to geojson --> CD.geojson
  2. Add aggregated user data to CD.geojson as properties per district feature
  3. Upload geojson to s3 and/or studio

Relevant Congressional District shapefile attributes

  • STATEFP: State Code
  • CD115FP: Congressional District Code

Example cd.geojson

{
"type": "FeatureCollection",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
                                                                                
"features": [
{ 
  "type": "Feature", 
  "properties": { 
        "STATEFP": "02", 
         "CD115FP": "00", 
         "num_users": "200", 
         "num_messages": "250" 
    }, 
   "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 179.388742, 51.941917 ], [ 179.404562, 51.968358 ], [ 179.401376, 51.973083 ], [ 179.408729, 52.005355 ], [ 179.429602, 52.023583 ], ...

cc @millzpaugh

Setup s3 bucket

We plan to hold geojson prefixed by state on s3.

s3://resistbot/data/ca/
s3://resistbot/data/co/
s3://resistbot/data/ct/
s3://resistbot/data/de/

Each folder containing:

  • state.geojson
    • # users
    • # messages
  • congressional_district.geojson
    • # users
    • # messages

{add photo}

cc @millzpaugh

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.