1/16/2018 Lecture Notes: Welcome to Dataviz!

Tues 1/16/2018 Class: Welcome!

12:30-12:50: Welcome! An Introduction to using data visualization to tell stories.

  • Quick roll call.
  • Before next class, please register for the class blog (follow instructions from an email the system sent you) and fill out this survey.
  • Review how the class site is organized.
  • Walkthrough of the syllabus and schedule.
  • Presentation:

12:50-1: What is Dataviz? 

1-1:15: Exercise: And now for a little magic. Introduce yourself through data!

  1. Open this URL. How did that data get in there? Let’s find out together.
  2. Google yourself and find an image that is publicly available on the web. Right-click the image and get the URL.
  3. Go to this Google spreadsheet and fill out your info. Put your image URL into the correct column, and put this code around it:
    <img src=”YOURURLHERE” width=”200″ />

    (Note: type this in, don’t copy and paste from this page).
  4. Take a look at this URL or the home page to see class data populating in real time.

Congrats! You Participated in a Data Visualization
You not only introduced yourself to the class, but you participated in your very first interactive data-driven visualization. The data is all in a Google spreadsheet, and some free Javascript and JQuery code called Tabletop.js that we will use in a future class pulls all of that data into a web page. Try changing any of your information and you will see that the public web roster updates in real time.

1:15-1:25: Excel
We will go through some basic features of Excel, and formulas.

  • Adding information as data
  • Add a formula
  • Columns and rows.
  • Formula: using the equal sign for functions. Basic math.
  • Sum columns or rows.
  • Select an area.
  • Format cells to change cell type (text, number).
  • Making charts in Excel.
  • Common formulas:  adding, subtracting, dividing, multiplying, summing.
  • CSV format versus native Excel format.
  • Sorting.
  • Filtering.

1:25-1:40: Putting it into practice: Sorting and filtering NYS bridge data

  • Bridges across the country are badly in need of repair, and it can literally be a life or death issue. Here’s more about that.
  • Download and unzip this data set of 51,000 bridges in New York State. bridges_blanksremoved.csv
  • Open it in Excel. Scroll right until you find the column “critfrac” (column DL) which stands for critical fracture. A y12 or y24 means outdated design, so a single solid hit can bring the entire bridge down.
  • Next, find the column “suffrtno” (column FC), which stands for Sufficiency Rating. Anything under 50 is considered dangerous.
  • Also note the “totlcost” (total cost to fix in thousands of dollars) in column DV, and “avdayno” (average daily traffic) in column AK.

Questions:

  1. How many bridges are in danger of collapsing due to critical fracture?
  2. How many bridges have an inadequate sufficiency rating?
  3. How many have both bad critical fracture and sufficiency rating numbers?
  4. How much traffic goes over the bridges with both bad critfrac and suffrtno ratings? (Use the data from “avdayno,” column AK).
  5. How much will it cost to fix the bridges with both bad critfrac and suffrtno ratings? (Use “totlcost”, column DV).Go through these yourself, then let’s review the answers and how to get them.

1:40-1:50: Looking ahead:

  • Thursday I will be out of town. Professor Jodi Upton will be guest lecturing starting at 1 p.m. You should start the class on your own by beginning to work on Assignment 2.
  • Let’s take a quick look at the NY State data site.