Project 4

Map 1: Cities

This map shows the countries in North America and South America. It has four layers. The first is the country layer. The second is the city layer. The third is the city label layer. The fourth is the timezone layer. During the creation of this map, I think the most important procedures are to create svg using d3, add the data to the svg and stylize the layers.

  1. Q1: This city is Montreal.
  2. Q2:Becasue in the code, it returns an element selection (#contents, an ID selector) and hence d3 knows to put the map into this element. The line (line 6)"#contents") controls it.
  3. Q3: Here, we set [90,0] as the rotation angle. It means 90 degree rotation on longitude and no rotatin on the other two axies, which also means we revolve the earth 90 degrees around the earth's axis.Thus, we can show North America and South America rather than Europe.
  4. Q4: Change the style in header to .place,.place-label{ fill:#ffff00; text-decoration: underline; }
    GEOJSON files:
  1. countries.geojson
  2. my_places.geojson
  3. timezones.geojson

Map 2: Population in Erie County