Now that you have successfully made a "visualization" of shapes and lines using d3, your next assignment is to successfully make a actual visualization... 5 times.
The goal of this project is to gain experience with as many data visualization libraries, languages, and tools as possible.
I have provided a small dataset about cars, cars-sample.csv
.
Each row contains a car and several variables about it, including miles-per-gallon, manufacturer, and more.
Your goal is to use 5 different tools to make the following chart:
These features should be preserved as much as possible in your replication:
- Data positioning: it should be a downward-trending scatterplot as shown. Weight should be on the x-axis and MPG on the y-axis.
- Scales: Note the scales do not start at 0.
- Axis ticks and labels: both axes are labeled and there are tick marks at 10, 20, 30, etcetera.
- Color mapping to Manufacturer.
- Size mapping to Weight.
- Opacity of circles set to 0.5 or 50%.
Other features are not required. This includes:
- The background grid.
- The legends.
Note that some software packages will make it impossible to perfectly preserve the above requirements. Be sure to note where these deviate.
Improvements are also welcome as part of Technical and Design achievements.
You are required to use 5 different tools or libraries.
Of the 5 tools, you must use at least 3 libraries (libraries require code of some kind).
This could be Python, R, Javascript
, or Java, Javascript, Matlab
or any other combination.
Dedicated tools (i.e. Excel) do not count towards the language requirement.
Otherwise, you should seek tools and libraries to fill out your 5.
Below are a few ideas. Do not limit yourself to this list! Some may be difficult choices, like Matlab or SPSS, which require large installations, licenses, and occasionally difficult UIs.
I have marked a few that are strongly suggested.
- R + ggplot2
<- definitely worth trying
- Excel
- d3
<- since the rest of the class uses this, we're requiring it
- Matplotlib
- three.js
<- well, it's a 3d library. not really recommended, but could be interesting and fun
- p5js
<- good for playing around. not really a chart lib
- Tableau
- Java 2d
- GNUplot
<- the CS department head uses this all the time :)
- Vega-lite <-
<- very interesting formal visualization model; might be the future of the field
- Flourish <-
<- popular in recent years
- PowerBI
- SPSS
You may write everything from scratch, or start with demo programs from books or the web. If you do start with code that you found, please identify the source of the code in your README and, most importantly, make non-trivial changes to the code to make it your own so you really learn what you're doing.
-
If you're using d3, key to this assignment is knowing how to load data. You will likely use the
d3.json
ord3.csv
functions to load the data you found. Beware that these functions are asynchronous, meaning it's possible to "build" an empty visualization before the data actually loads. -
For web languages like d3 Don't forget to run a local webserver when you're debugging. See this ebook if you're stuck.
A good readme with screenshots and structured documentation is required for this project. It should be possible to scroll through your readme to get an overview of all the tools and visualizations you produced.
- Each visualization should start with a top-level heading (e.g.
# d3
) - Each visualization should include a screenshot. Put these in an
img
folder and link through the readme (markdown command:![caption](img/<imgname>)
. - Write a paragraph for each visualization tool you use. What was easy? Difficult? Where could you see the tool being useful in the future? Did you have to use any hacks or data manipulation to get the right chart?
- Your code should be forked from the GitHub repo.
- Place all code, Excel sheets, etcetera in a named folder. For example,
r-ggplot, matlab, mathematica, excel
and so on. - Your writeup (readme.md in the repo) should also contain the following:
- Description of the Technical achievements you attempted with this visualization.
- Some ideas include interaction, such as mousing over to see more detail about the point selected.
- Description of the Design achievements you attempted with this visualization.
- Some ideas include consistent color choice, font choice, element size (e.g. the size of the circles).
- Fork the GitHub Repository. You now have a copy associated with your username.
- Make changes to fulfill the project requirements.
- To submit, make a Pull Request on the original repository.
Grades on a 120 point scale. 24 points will be based on your Technical and Design achievements, as explained in your readme.
Make sure you include the files necessary to reproduce your plots. You should structure these in folders if helpful. We will choose some at random to run and test.
NOTE: THE BELOW IS A SAMPLE ENTRY TO GET YOU STARTED ON YOUR README. YOU MAY DELETE THE ABOVE.
R is a language primarily focused on statistical computing. ggplot2 is a popular library for charting in R. R Markdown is a document format that compiles to HTML or PDF and allows you to include the output of R code directly in the document.
To visualized the cars dataset, I made use of ggplot2's geom_point()
layer, with aesthetics functions for the color and size.
While it takes time to find the correct documentation, these functions made the effort creating this chart minimal.
(And so on...)
- Proved P=NP: Using a combination of...
- Solved AI Forever: ...
- Re-vamped Apple's Design Philosophy: As demonstrated in my colorscheme...