Coder Social home page Coder Social logo

slerkpatomsak / d3-bayarea Goto Github PK

View Code? Open in Web Editor NEW

This project forked from frankbowers24/d3-bayarea

0.0 1.0 0.0 5.23 MB

Bay Area Data Visualization using D3

Home Page: http://frank-bowers.ghost.io/bay-area-stats/

JavaScript 44.83% HTML 42.71% CSS 12.47%

d3-bayarea's Introduction

d3-bayarea

Bay Area Data Visualization using D3

Read the blog post

Try it out

This is a mashup of many D3 examples:

  1. Choropleth
  2. Zoom USA map
  3. Pie chart with labels
  4. D3 legend

Try out Bay Area Stats:

  1. Click, pan and zoom the map
  2. Enter a city name or zip code and click Select
  3. Change the comboBox to see Race/Ethnicity
  4. Select Race: Asian and select Asian nationalities
  5. Notice how the pie chart changes when you click on different zip code regions. The pie chart changes are most interesting when the change in data is greatest.

I got all the data and map boundaries directly from the Census Bureau and the IRS and converted it to JSON using QGIS, ogr2ogr, and node.js scripts that I wrote.

I downloaded cb_2013_us_zcta510_500k.shp, 2013 Census Bureau Zip Code Tabulation Area boundaries

I used QGIS 2.6 to filter out zip code tabulation area boundaries for the Bay Area from the national census shapefile.

I used ogr2ogr to convert census shapefiles to GEOJSON for d3.

ogr2ogr -f geoJSON -select GEOID10 Bay_Area.json Bay_Area.shp -simplify 0.001

The zip code boundary file did not include place names so I used the web service ziptasticapi.com to get a place name for each zip code.

If you enter a city name all the zip codes for the city are selected and the city is animated to the center of the map. The data shown in the pie chart is aggregated from all the selected zip codes.

d3-bayarea's People

Contributors

frankbowers24 avatar

Watchers

James Cloos 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.