I often want to know just a bit more about numbers I see in tables. As I was looking at some thing today, I stumbled on the Wikipedia page for “List of Most Viewed YouTube Videos“. After being more than a bit amazed at the utterly staggering numbers. I wanted to know what they translated to in terms of years because the numbers were just too big. I remembered that Google Spreadsheets will let you pull in a table from a website with no fuss. All I needed to do was put =IMPORTHTML(“http://en.wikipedia.org/wiki/List_of_most_viewed_YouTube_videos”,”table”,1) in the first cell on the spreadsheet and viola the table is transcluded. I can now add a few more calculations to figure out the import stuff – like how many years worth of time have been spent watching Gangnam Style (16,274.24 years for the recordAssuming I didn’t screw something up.). You can go mess around with the data here.
U.S. Housing Prices The first example is an animated roller coaster ride of US home costs adjusted for inflation. It’s a pretty dramatic and entertaining way to look at the data (link from Digg). It makes a graph “real” in a way that I’ve never really seen before. Personal Pies Personal Pies (great title) is even better because it allows your students a lot of flexibility in the product they create and the data couldn’t be any more relevant to them. He’s created pie charts for his life- everything from portion of life with beard to number of states he’s visited (there is one non-school safe “pie” so be warned). This is a perfect project for students dealing with pie charts and percentages. (from Anil Dash) I think these examples are important because they prove that data (or anything else for that matter) doesn’t have to be boring or presented in boring ways. I try to think about two things when creating project/presentation or anything else- Is this going to fun and original? Is this personally relevant to my students? I guess both those really focus on engagement. It always amazes me how little attention the difference between engagement and silent acquiescence gets.
Because I love Alan. Here’s the API version in Google Script to grab YouTube stats. It does a bit more than the previous XPath version and you can set it to be triggered repeatedly. I’m going to add a loop to add multiple videos etc. in the near future but it’s a good start for anyone who’s doing research on stuff like this. It is funny what you might notice when you can see the data like this. I triggered it manually twice just to get a few lines in there. Notice that between the first two entries there are no additional views but a chunk more likes/dislikes. Makes me wonder if people are just weighing in without watching or if the data are collected differently resulting in some delay. Here’s the scriptIt took me a good while to realize I need to do the  piece to navigate the first element. My best friend is Logger.log(yourVariable) in Google Script. When I finally got methodical enough and used it to spit out the variable results at each level, I was able to figure it out. and it’s pretty well commented up. You’ll need an API key. 🙂 You do see some weird stuff in the raw JSON. Like there’s a Favorites field. Does that exist in YouTube? I didn’t really […]