/od-visualizer

Interactively visualize OD flows with Leaflet and D3

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

od-visualizer

Interactively visualize OD flows with Leaflet and D3

Resources I drew on

Sample data

  • Polygons
    • Cartographic Boundary Files from the Census Bureau - download all US counties, filter down to California counties
    • export as GeoJSON (in ArcGIS Pro, but could have used any other GIS software)
    • adjust GeoJSON coordinate precision (down from a preposterous 14 decimal points to a more reasonable 4 decimal points, about 10 meters accuracy) using https://github.com/jczaplew/geojson-precision
  • Flows
    • Commuting Flows from the Census Bureau - download all US county-to-county flows, filter down to flows among California counties
    • lightly process in Excel to produce simple schema: year (downloaded 2015 and 2010, just to have a field to filter on via drop-down), o_id (residence county FIPS code), o_name (residence county name, sans " County"), d_id/d_name (employment county FIPS code/name), vol (commute flow)