There are essentially 3 main objectives:-
- Analyze the relationship between various weather parameters (maximum temperature, wind-speed, cloudiness & humidity) with Latitude.
- Visualize the weather of 500+ cities using OpenWeatherMap API using gmap heatmaps
- Search for ideal vacation spots (based on certain weather conditions) using Google Places API.
You should have the following python packages installed in your Python environment to run the included jupyter notebooks:-
os
random
pandas
numpy
scipy
matplotlib
datetime
os
citipy (source: https://github.com/wingchen/citipy)
pycountry (source: https://pypi.org/project/pycountry/)
gmaps
You will also require: (a) Google Maps API key and (b) OpenWeatherMap API key which can be replaced in api_keys_template.py
. The file then should be renamed to api_keys.py
to work with the existing code.
There are 2 main folders which contain the Jupyter notebooks prepared for analysis.
- The data retrieval from OpenWeatherMap API and data cleaning is peformed in /WeatherPy/WeatherPy_data_retrieval.ipynb. The data was retrieved on February 01, 2020. To ensure that the accurate results are shown in the analysis, a variable
days_since_data_request
has been encoded in the notebook. It is essential that this parameter be changed to obtain accurate plot titles. Example: If the code is being run on February 9, 2020, thendays_since_data_request = 8
. Thetimedelta
function ofdatetime
is used to show the correct date on plot titles. - The analysis of relationships between Latitude and weather conditions is performed in /WeatherPy/WeatherPy_analysis.ipynb. The analysis is performed for cities in Northern and Southern hemispheres for each of the four weather parameters mentioned above.
- Visualizations and recommendation for ideal vacation spots based on given weather conditions is performed in /VacationPy/VacationPy_analysis.ipynb.
- The generated images from analyses are exported as
.png
format and placed in /Outputs/Images folder. - The queried dataframe using OpenWeather API on Feb 01, 2020 is also included in /Outputs/weather_df.csv.
Maximum Temperature:-
(1) Southern Hemisphere: Weak positive correlation with Latitude. As distance from South Pole increases, Maximum Temperature increases.
(2) Northern Hemisphere: Strong negative correlation with Latitude. As distance from North Pole decreases, Max Temperature increases.
Humidity: Humidity is not correlated with Latitude.
Cloudiness: Cloudiness is not correlated with Latitude.
Wind Speed:-
(a) Southern Hemisphere: Very Weak negative correlation with Latitude.
(b) Northern Hemisphere: Very weak positive correlation with Latitude.