Message Boards Message Boards

Temperature in Champaign, IL from 1973-2017 - Visualization

Posted 7 years ago

Oftentimes when browsing the DataIsBeautiful subreddit I look at the content and think to myself, "this would be pretty easy to make in Wolfram Language," at which point I promptly forget I had that thought and move on to the next post (where I likely have the same thought).

Today I stumbled upon a post by user with a beautiful graphic visualizing the hourly temperature in Brooklyn from 1973 through 2017. This time I decided to act upon my "this would be pretty easy to make in Wolfram Language" thoughts, and went at it.

Wolfram Language's WeatherData functionality made gathering the temperatures a breeze (weather puns), and I was able to bring all the data into Mathematica with a single line of code:

WeatherData[Entity["City", {"Champaign", "Illinois", "UnitedStates"}], 
"Temperature", {{1970, 1, 1}, Today, "Day"}]

After that it was just a matter of converting the degrees to Fahrenheit, getting the colors right (I really liked the colors in the original graphic, so I tried to mimic them), and then creating and formatting the rows (click to zoom).

Champaign Weather

I really don't want to take anything away from the original creator (here is a GitHub link with his R source code), as his was much more carefully done (he took care of leap years so his hours actually line up, etc...), I just wanted to demonstrate how easy it was to accomplish something similar in the Wolfram Language.

Here is the notebook (also attached) I used to create this (in the Cloud some things don't line up quite the same as they do on my Desktop, but the end result is the same). All that would be required to make this same chart for another city would be to edit the city entity in the first line of code, and perhaps edit the scaling to better accommodate the maximum and minimum temperature for that region.



enter image description here


enter image description here

(*quick pic for looking at how the bleding will turn out*)

enter image description here






{{Null,Column[{Style["Daily Temperature in Champaign, IL",FontFamily->"Helvetica",
18,Bold],Style["1973 - 2017",FontFamily->"Avenir",13]}],SpanFromLeft}


POSTED BY: Kyle Martin
5 Replies

Dear Kyle,

this is a really nice representation of the temperature data, thanks for sharing!

I was wondering if this picture is telling anything about some long term trend - in the context of global warming. Obviously this is not the case, and a little data analysis is showing the reason: Champaign seems to experience - against all trends - a cooling rather than a warming.

enter image description here

So at least in Champaign the sea level will not rise, lucky WR!

The short code is attached, the list of cities can easily be changed.

Best regards -- Henrik

POSTED BY: Henrik Schachner
Posted 7 years ago

I'd be hesitant to use the type of visualization I created to look at long term effects. I find it very hard to visually identify any long term trends like warming or cooling at that granularity.

The tool you shared is very cool though! I'm going to store it in my "useful notebooks" folder, I think there's a good chance I want to refer back to it at some point in the future (either for the content or methods used).


POSTED BY: Kyle Martin

enter image description here - Congratulations! This post is now a Staff Pick as distinguished by a badge on your profile! Thank you, keep it coming!

POSTED BY: Moderation Team

Dear Kyle,

That's a good job. Congratulations!

I am studying on daily air temperature prediction using ANN, how this visualization can help us for getting better prediction? In other word, how could be used this visualization by engineers ?

Kind regards,


POSTED BY: M.A. Ghorbani
Posted 7 years ago

Unfortunately I don't have much background in meteorology, so I'm not sure I can give you any great advice. Best of luck though.

POSTED BY: Kyle Martin
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract