12

Nov

Real-Time Thermometer with SmartThings and PHP

Here is a real-time FirstMark temperature monitor, created with a SmartThings starter kit, Highcharts.js, a little bit of PHP, and MySQL. (Doesn’t look great on mobile yet.)

image

Now we’ll always know whether it’s LDL or RH temperature! This is how crazy simple the SmartThings SmartApp code is:

14

Oct

The Most Popular Classic Rock Songs

Using the yes.com API, I was able to load playlists for over 1,000 different radio stations. There is a lot of data to analyze here, but one of the first questions I sought to answer was “What are the most popular songs and artists on classic rock radio?”

Originally, I categorized any station that played Aerosmith and Led Zeppelin at least once per day as a classic rock station. An astute friend pointed out that I was “sampling on the dependent variable.” To address this, I filtered for stations that played (i) at least one song by Pink Floyd, Led Zeppelin, The Beatles, Fleetwood Mac, the Rolling Stones, and Aerosmith, and (ii) played at least one song by all of those artists. The source data do not have reliable genre tags, so this is the most appropriate test I could think of; I am open to alternative suggestions.

Of the 1,000 radio stations, 91 are considered ‘classic rock.’ Across 1 week, 111,000 songs, 5,421 unique songs, and 1,448 unique artists, here are the twenty most popular songs:

  

  1. Sweet Home Alabama, Lynyrd Skynyrd (0.55 plays/day)
  2. Sweet Emotion, Aerosmith (0.53 plays/day)
  3. Carry On Wayward Son, Kansas (0.51 plays/day)
  4. More Than A Feeling, Boston (0.49 plays/day)
  5. Dream On, Aerosmith (0.47 plays/day)
  6. Another Brick In The Wall (Pt II), Pink Floyd (0.47 plays/day)
  7. The Joker, Steve Miller (0.46 plays/day)
  8. Don’t Stop Believin’, Journey (0.45 plays/day)
  9. We Will Rock You, Queen (0.45 plays/day)
  10. Another One Bites The Dust, Queen (0.45 plays/day)
  11. You Shook Me All Night Long, AC/DC (0.45 plays/day)
  12. Renegade, Styx (0.45 plays/day)
  13. Wanted Dead Or Alive, Bon Jovi (0.44 plays/day)
  14. Magic Man, Heart (0.44 plays/day)
  15. I Want You To Want Me (Live), Cheap Trick (0.44 plays/day)
  16. We Are The Champions, Queen (0.43 plays/day)
  17. Barracuda, Heart (0.43 plays/day)
  18. Centerfold, J. Geils Band (0.43 plays/day)
  19. I Love Rock ‘N Roll, Joan Jett (0.43 plays/day)
  20. Free Fallin’, Tom Petty (0.42 plays/day)

These are the twenty most popular classic rock artists:

  1. Led Zeppelin (5.30 plays/day)
  2. Van Halen (4.36 plays/day)
  3. Rolling Stones (4.18 plays/day)
  4. Pink Floyd (3.92 plays/day)
  5. Aerosmith (3.63 plays/day)
  6. Queen (3.59 plays/day)
  7. Tom Petty (3.55 plays/day)
  8. AC/DC (3.14 plays/day)
  9. Journey (3.09 plays/day)
  10. Eagles (2.98 plays/day)
  11. Boston (2.82 plays/day)
  12. ZZ Top (2.74 plays/day)
  13. Steve Miller (2.60 plays/day)
  14. Foreigner (2.59 plays/day)
  15. Def Leppard (2.57 plays/day)
  16. Who (2.42 plays/day)
  17. Beatles (2.42 plays/day)
  18. U2 (2.26 plays/day)
  19. Police (2.16 plays/day)
  20. Lynyrd Skynyrd (2.15 plays/day)