Assigned: Monday, Feb 20, 2017
Due: Monday, Feb 27, 2017 at noon
Collaboration: You should work with your assigned partner for this lab.
In this lab, you will use your developing D3 expertise to build a scatter plot from a CSV dataset.
This time we will use a subset of R’s txhousing dataset, which includes monthly home sales numbers from cities in Texas;
this dataset includes many cities, but I have selected a subset of the four most largest cities in Texas by population: Houston, San Antonio, Dallas, and Austin.
Unlike the previous lab, I won’t tell you exactly what to plot;
I am interested in how home prices and sales interact in different cities, but you will have to decide what variables to plot.
Hint: you might want to make it easy to change which value you plot on your scatter plot so you can explore the dataset graphically.
As usual, start this lab by forking the starter code on GitHub at grinnell-cs/datavis-scatter-plot. Make sure you add your partner as a collaborator on the repository so you can both push changes.
The lab starter code includes the basic HTML template, an empty CSS file, and few lines to load the dataset from the CSV file. As with the last lab, you will need to run a local web server to test this file if you use Chrome as your web browser; apparently Firefox works just fine without running a server.
The requirements for this lab are fairly open-ended, but a complete lab should help me to answer at least one of the following questions:
Hint: You may not see many clear trends if you plot all the points together. If you separate points by city, using either color or facets, you might notice some more interesting trends.
In addition to helping me to answer one of the questions above, your lab must include:
We will spend time in class to discuss scales and axes, but you may want to look at the D3 Documentation on Continuous Scales. This takes care of some of the hassle in dealing with the SVG inverted coordinate system.
If you complete the basics of your scatter plot in the available time, you can earn some extra credit by adding multiple scatter plots on one page. This could help you to give a better sense of the dataset than you could fit into a single plot. You should implement your plots using shared code rather than copy-pasting code for each scatterplot.