This directory is divided into two parts. Part I contains a jupyter notebook which analyses the weather patterns of 672 cities from around the world of varying distance from the equator. Part II contains a juptyer notebook which uses Google Maps to generate a humidity heatmap of all cities listed in Part I, and also displays hotels in cities which meet my ideal weather for a vacation.
From the analysis of weather patterns from 672 randomly chosen cities, the following four observation were found:
Observation 1: There is a relatively strong relationship between a city's temperature and it's distance from the equator.
Several of the figures show that city temperatures increase the closer they are to the equator. For instance Figure 5 shows that there is a strong negative correlation between maximum temperature and latitude for cities located within the Northern hemisphere (-0.81), while Figure 6 shows a slightly weaker but still strong positive relationship between maximum temperature and latitude for cities located within the Southern hemisphere (0.76). This may be because the equator always gets the most amount of direct sunlight (and thus warmth) of any place on the planet.
Observation 2: There is a very weak relationship between a city's wind speed and it's distance from the equator.
The data shows that there is a weak relationship between a city's wind speed and it's distance from the equator and that this relationship differs in both strength and direction depending on the hemisphere. For instance Figure 11 shows a very weak positive relationship between wind speed (mph) and latitude for cities located within the Northern hemisphere (0.09), while Figure 12 shows a slightly weaker opposite relationship between wind speed (mph) and latitude for cities located within the Southern hemisphere (-0.08).
Observation 3: There is a very weak relationship between a city's cloudiness and it's distance from the equator.
The data shows that there is a weak relationship between a city's cloudiness and it's distance from the equator and that this relationship differs slightly in strength depending on the hemisphere. For instance Figure 9 shows a very weak positive relationship between cloudiness (%) and latitude for cities located within the Northern hemisphere (0.03), while Figure 10 shows a slightly stronger positive relationship between cloudiness (%) and latitude for cities located within the Southern hemisphere (0.13).
Observation 4: There is a very weak relationship between a city's humidity and it's distance from the equator.
The data shows that there is a weak relationship between a city's humidity and it's distance from the equator and that this relationship differs slightly in strength and direction depending on the hemisphere. For instance Figure 7 shows a very weak positive relationship between humidity (%) and latitude for cities located within the Northern hemisphere (0.04), while Figure 8 shows a slightly weaker negative relationship between humidity (%) and latitude for cities located within the Southern hemisphere (-0.02). This difference may be because there is more land to heat up in the northern hemisphere which causes the air to become slightly warmer and thus more humid.
I created a heat map that displays the humidity for every city from Part I, which also has markers for all the cities which fit my ideal vaction weather data of
- A max temperature lower than 80 degrees but higher than 70.
- Wind speed less than 10 mph.
- Zero cloudiness.
- OpenWeatherAPI
- Python
- Pandas
- Matplotlib
- Citipy
- Gmaps
- Download the directory.
- Go to openweathermap.org and follow these instructions to get your API key.
- Go to Google Developers and follow these instructions to get your API key.
- Go to the API keys config file and enter your OpenWeatherMap API key in the
weather_api_key
variable and your Google API key in theg_key
variable. - Open the WeatherPy folder and then open Git Bash and type
jupyter notebook
to see either notebook.