What's the weather like as we approach the equator? You may be thinking: "Duh. It gets hotter..." But, if pressed, how would you prove it?
In this project we are pulling weather data for 500 randomly selected cities across the globe from OpenWeatherMap API. Specifically we are looking into: temperature, humidity, cloudiness and wind speed.
Let's use Seaborn's Pairgrid first to plot pairwise relationships in the dataset with distribution on the diagonal. This type of visual representation, also called Small multiple allows quickly extract a lot of information about relationships between variables in a dataset.
Distribution data suggests that we live on a rather hot humid planet with fewer clouds. Suprisingly to me it's a bit more humid when there are less clouds. The temperature rises too when sky is clear.
Plot also suggests that the air gets dryer as temperature drops. Fun fact: the scatter plot of latitude vs longitude shows us the planet. The only strong correlation is between latitude and temperature–we can see an bow-like ark with the peak around 0º also know as Equator. Simple scatter plots are boring: let's plot our data on a real map!See the plots
It's the same scatter plot but rendered on top of a map. The arc we observed prior is represented as yellowish colors alonside equator. The data was pulled on May 12, 2017 and as we can see it's still pretty cold above 60º in northern hemisphere. Too bad for Russians and Canadians.Next
As we already saw it's pretty clear sky everywhere. It's a bit of a surprise too because all the images from the space show our planet as mostly cloudy. Right! The reason is that the data we pulled is from the cities and the oceans cover 71% of Earth's surface. Our observation re fewer clouds might be wrong.Next
Wind speed seems to be all over with no definitive correlation. Let's not forget the data is from the cities and not the entire surface of Earth.Next
The plot suggests it's pretty humid along the coast line. The map representation versus regular scatter plot also allows us to spot some outliers: North-Western coast of Australia and Pacific coast of Mexico. Maybe it was a cloudy day? In fact it was! Look at the clouds plot above. The same regions were cloudy.
Let's look at the data used to build the plots.See the dataset
The four map plots as simple scatter plots are left for the reference. All the data used for this project can be found in the table below.
All the code for this project can be found on the Github Repository.