GithubHelp home page GithubHelp logo

redistricting's Introduction

otl-metromerger

Metropolitan merger simulation with Leaflet choropleth map framework for On The Line project (http://OnTheLine.trincoll.edu)

Demo

http://jackdougherty.github.io/otl-metromerger

To Do

  • add reset button to clear selected polygons (remove and readd geoJson layer? or just refresh browser?)
  • can click event listener be modified to toggle? Turn off selected polygons that have already been turned on?
  • find way to present infowindow data as a table or grid
  • add link to data source
  • start a second version: a School District merger tool, possibly with CT only data layer, or EdBuild national data layer?

Steps to construct this

  1. Begin with Leaflet choropleth tutorial at http://leafletjs.com/examples/choropleth.html

  2. Create simplified geoJson layer of Connecticut town boundaries

  1. Join spreadsheet town data to the new simplified polygon shapefile
  • in GIS application (such as ArcGIS or QGIS), load the new simplified polygon shapefile and spreadsheet data
  • join data to shapefile, then export > save as new shapefile in new layer, and open attributes to delete unneeded columns
  • create a new folder with four files (.shp, .shx, .dbf, .prj) and zip folder for next step
  1. Convert new joined shapefile (simplified boundaries + data) into js format to use in Leaflet map
  • Use ogre to ogre web client (http://ogre.adc4gis.com/) to convert zipped shapefile to geojson
  • Copy and paste the geojson output into a new file, and modify into json this way:
  • At top of new file, declare contents as a variable by adding this text:
var data =
  • At the bottom of the new file, add a semicolon (;)
  • Rename file suffix as .js, place inside local directory, and upload in the Leaflet HTML index template
  1. See code comments in the Leaflet index.html template

Credits

redistricting's People

Contributors

nav10003 avatar

Stargazers

Jack Dougherty avatar

Watchers

Jack Dougherty avatar James Cloos avatar  avatar

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.