- Details
- Parent Category: Programming Assignments' Solutions
We Helped With This JavaScript Programming Homework: Have A Similar One?

Category | Programming |
---|---|
Subject | JavaScript |
Difficulty | College |
Status | Solved |
More Info | Javascript Homework |
Assignment Description
You can be creative on all projects.
You can also use the same city for 2 and 3 (but not required), and the map from Airbnb for problem 2, if you want.
Preliminary question - What did you like about javascript/D3 and
what did you find annoying? You can compare them with other programming languages, of you want. Your answer should be relatively short.
1. Create a basic html file (there are plenty examples in the homework files). Use JavaScript to create a dataset of three variables, by generating random integers. The dataset should contain 20 integer triples between 10and 50. So it will look like [[11, 21, 12], [21, 49, 30], ...]. Create a barchartusing the first variable as the height of the bar, the second for the width ofeach bar, and the third for the fill opacity of the bar. You should use scales forthe second and third variables. Show a text with the height of the bar on eachbar (or above); use a solid color (with different opacity) for the bars, such asblue, red, etc. Add hovering effect for each bar (to change its color). Add ascaling capability (when you click a paragraph in the html file, the height ofthe bar is changed to 1/2). You need to use the D3 library for this. Submit the html file (assuming that all css and JavaScript commands are inside thatfile.
2. Go to a city’s data portal; for Chicago you go to:
https://data.cityofchicago.org/browse, but you can choose any city. Create a map of that city’s neighborhoods (the json file can be downloaded form the same web page) and pick another data, such as the rodent incidents, crimes, etc. Visualize that data on the same map, say with circles. Create the following effect: when the mouse is over a circle, its color should change and somewhere in a paragraph, off the map, the address should be printed.
You need to use D3 for this.
create a slider that filters the data by month.
3. Go to the Airbnb web pagehttp://insideairbnb.com/get-the-data.html and pick a city, download the neigh-borhoods map and the listings one. Use Vega to create a map with the listings;color them by type (house, private room, shared room) and create a tooltip to show you the price on mouseover.