openlexington/whats_my_district_redux

Name: whats_my_district_redux

Owner: OpenLexington

Description: A remake of Whatsmydistrict.org, fully client side.

Created: 2015-03-06 20:50:55.0

Updated: 2018-02-12 17:49:22.0

Pushed: 2018-02-07 20:47:46.0

Homepage: http://whatsmydistrict.org

Size: 4136

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

What's My District (Redux)

What is this?

What's My District? started off as a 2013 National Day of Civic Hacking project. It essentially allows anyone in Lexington, KY to input their address and find out all the different districts they are in, including schools, council districts, magistrate districts, etc.

It was a Sinatra app using convoluted PostGIS queries and a pain to deploy. With Mapbox releasing Turf.js, I, @blakeshall, decided to remake What's My District. This is the results. All client side, all static files, and can be deployed on GitHub. I'm even adding finding and showing the nearest hospital, library, post office, and fire station.

The end goal is to break the abstract logic into a small library with all city/county specific stuff in a lexington.js file. This way other cities can get a jump start building their own version.

Current Dependencies:

Running locally

Use Python simple server from project root directory.

  1. python -m SimpleHTTPServer
  2. load localhost:8000
  3. voila!
Keeping gh-pages branch in sync with master

After merging pull-request into master,

  1. git co master
  2. git pull
  3. git co gh-pages
  4. git merge master
  5. git push
How to update geospatial data
  1. Download dataset(s) from Lexington's Open Data Catalog
  2. Extract .zip file
  3. Convert .shp to .geojson
  4. Add / replace geojson in assets/data
Converting .shp to .geojson

Use gdal's ogre to convert .shp format to .geojson format.

e.g. ogr2ogr -f GeoJSON -t_srs crs:84 voting.geojson VotingPrecinct.shp

It's possible that the zip file is also the .shp file or can be treated as such.

Contributing

Pull requests welcome! Please see our contribution guide.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.