Project0
Due 11:59pm, Friday, February 17 through GitHub Project 0: Visualizing Anscombe’s Quartethttps://classroom.github.com/assignment-invitations/e212956ea5f76c1dff4c036b0e2679ee
In this project, you will work with D3 to visualize the four datasets of Anscombe’s quartet. Parts 1 through 5 will be required for the assignment, whereas the bells and whistles are optional extra credit additions.
You may optionally work in groups on this project. If you choose to work with others, all group members must submit their own work and you should note who you worked with the complete the project at the top of your readme.txt file. Collaboration Policy:
You are also welcome to use resources found online; however, the code you submit should be your own (please do not directly copy-paste code from a tutorial or online example). If you use code from any online sources, please also list those sources and what pieces of the code you used those sources to complete. Also, for each of these sources, please add your own comments as to what the code does so I can grade your project based on your own understanding of the code.
All assignments must be submitted through GitHub. I will add you to the class GitHub using the id you provided in the course survey (if you did not provide one or do not receive an invitation to the GitHub organization by Monday, February 13, please let me know). Submission:
To submit your assignment, please create a new directory in the “Submissions” directory, named as your last name (e.g., “szafir”). All submissions should include a readme.txt with the answers to the free response questions and a list of any collaborators you worked with on this project.
Each of Parts 1 - 5 is worth 10 points. Completing the readme.txt is worth 10 points, for a total of 60 points. If you are unable to get any pieces of the project to work, please comment out the broken pieces of code and add notes in your readme.txt as to what you were trying to do with that code and where you ran into problems. Partial credit will be given on the basis of these comments. Partial credit will not be given for extra credit options. Rubric:
Per the course policies, projects may be submitted up to 72 hours late, with a 10% point deduction per day.
Project Specifications
Pull down the project code from GitHub. In the submissions directory, create a directory using your last name (e.g., szafir) and copy the data directory, index.html, and project0.css into it. Then, open up the index.html page in your text editor. Part 1: Interpreting Data
One of the challenges with using any dataset is figuring out how to get it from its original format into your visualization. You’ve been provided with four CSV (comma-separated values) files in the data directory of the project GitHub. Under Part One in index.html, use D3’s d3.csv functionality to upload all four datasets. To do this, you should be sure to import D3 inside of your webpage’s (your choice of version) and make sure you’re using a local server to work with your code (either with XAMPP or Python). Each time you use d3.csv, you should include a function that calls the checkDataset function on your data (this is included in the skeleton code).
To test if this is working, make sure your server is running and open your browser. Then go to the url localhost/Project0/submissions//index.html. Under “Part 1”, you should see a note that shows all four datasets have been uploaded correctly.
Under Part Two in index.html, create a bar chart using the x-values (labelled x) for one of the four datasets (your choice of which one). The height of the bar should correspond to the x-value of the data, the order of the bars should correspond to either their natural order in the dataset or to the relative x-value (e.g., the position the datapoint would be in if we sorted all of the datapoints according to their x-value). Part 2: Building Bars
Your barchart should have both an x- and y-axis, and the data should be scaled according to the maximum x-value in the dataset. Please use the d3.max function to create this scale rather than hard-coding a specific value. Look at the in-class tutorial for an example of how to do this. Note that you will need to load the dataset you’re using prior to building the visualization.