In-class Excercises
Part 1: JavaScript refresher
Recall your web development skills through this exercise. Write this code in a code editor on your computer or use an online code editor such a JS Bin.
- Create an HTML page.
- Add a
select
input and adiv
element. - Style your page using CSS.
- Add JavaScript to your page such that when the
select
changes thediv
's CSS properties change, in a manner of your choosing. For example, theselect
might have options for colors that update the background color of thediv
as in this example. - Post your page to Gist or a GitHub repository.
Part 2: CartoDB
Let's get familiar with CartoDB's interface.
- Create a CartoDB account (using an email address ending in .edu if you have one).
- Download data from the AirBnB listings via Inside AirBnB for a New York City (you want the file called
listings.csv
under New York City). - Upload the data to CartoDB and explore its visualization wizards.
- Do the same with a shapefile of City Council Districts on the city's open data portal. Shapefiles have to be zipped to be uploaded to CartoDB.
- Edit the infowindows for your visualization.
- Publish your visualization and get a public link for it.