JavaScript代写:CS111981 Housing Virginia

使用D3库,对Housing Virginia的数据进行数据可视化。



FusionCharts library has to be replaced with a D3 implementation of maps.


Create a web page that displays a map that replicates the map shown in for a specific data element.


  • When the mouse pointer hovers over a county area on the map, the county area color changes to light blue and a tooltip is displayed.
    • The tooltip shows a line plot showing the change in data values over time.
  • The map data is available at
  • Every county has a unique id, represented as COUNTYFP attribute.
  • For example, for Montgomery county, the unique county id is 121.
  • The data is available from
    • However, it is possible that some counties did not provide data. In that case the county is rendered grey and only the county name is displayed in the tooltip.
    • It is also possible to that id does not match any county on the map. In that case the corresponding data is ignored.
  • The color of a county area on the map depends on the percentage value:
    • Not reported: grey.
    • Between 0% (green) and 30% (yellow): a linear interpolation between green and yellow.
    • Between 30% (yellow) and 100% (red): a linear interpolation between yellow and red.
    • Above 100%: red.
  • The web page title is:
    • PID is your VT PID
    • My VT PID is gracanin so in my case the title would be: Homework 1: gracanin

Skeleton Code

  • A skeleton code is provided:
    • hw1.html: HTML5 source code
    • hw1.css : CSS source code
    • hw1.js : D3 JavaScript source code
  • You can use the skeleton code as a starting point for your Homework 1 solution (don’t forget to change the author name in the comments and in the window title).


  • Basic map, title and subtitle: 30 points
  • Data display using the color scheme: 30 points
  • Interactive tooltips: 40 points


Submit (upload) your solutions as a single ZIP archive file named is For example, my PID is gracanin so my file would be called The ZIP archive must contain the following files:

  • hw1.html: HTML5 source code
  • hw1.css: CSS source code
  • hw1.js: D3 JavaScript source code