Code Monkey home page Code Monkey logo

assignment-5's Introduction

Assignment-5

In this assignment, you will use the suite of tools under d3.geo to draw a choropleth of median household income by census block group in the City of Boston.

Available data

Under the data folder are three files: -A GeoJSON file of Boston census block groups, with a unique ID for each; -a .csv file of median household income by block group (the "B19013001" column), with each block group again identified by the same ID; -A GeoJSON file of Boston neighborhoods. This contains neighborhood boundaries and names, and is meant to help add context to the map.

The first two files will allow you to draw the choropleth; the neighborhood GeoJSON file lets you add additional context, such as neighborhood boundaries and labels.

For a brief overview of the census and its various levels of geographies, visit this link: https://en.wikipedia.org/wiki/Census_block_group

Projection and d3.geo.path() generator

Use the Mercator projection for this assignment, and center the projection at the lngLat point provided. One thing to consider is the scale: since the mercator projection is usually used to project the entire world.

Draw the map

Draw a choropleth, based on the census block group data and a color scale of your choice.

Also draw neighborhood boundaries, and label each neighborhood with its name. Hint: you'll have to use the path.centroid function.

The recommended DOM layout is as follows:

<g class="block-groups">
  <path class="block-group" ...>
</g>
<g class="neighborhoods">
  <g class="neighborhood">
    <path class="boundary" ...>
    <text class="label" ...>
  </g>
</g>

assignment-5's People

Contributors

viztech avatar

Watchers

mkos 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.