Overview of Project How to Use Results References
It’s true not everyone is as worldly-wise as someone who’s traveled to all four corners. but having an idea about weather conditions and access to finding a good place for a trip on every time is very helpful. In this case Travel companies advertising flights, hotels or resorts can adopt the strategy of segment-targeting an audience experiencing bad weather (such as cold temperatures, Cloudiness, high Wind Speed, etc. conditions). For display or social campaigns, weather targeting works best when coupled with aspirational creative showing sunny tropical vistas to enforce a yearning for warmth and sunshine.
This project is broken down into two deliverables, WeatherPy and VacationPy.
-
WeatherPy:
- Use the OpenWeatherMap API to retrieve weather data from the cities list generated with citipy Python library.
- Create a series of scatter plots to showcase the relationships between
Latitude
and:
Temperature
Humidity
Cloudiness
Wind Speed
- Linear regression scatter plot for Northern Hemisphere and Southern Hemisphere to showcase above relationships.
-
VacationPy:
- Create a map that displays a point for every city in the WeatherPy section DataFrame.
- Narrow down the DataFrame to find your ideal weather condition and make hotel DataFrame.
- Use the Geoapify API to find the first hotel located within 10,000 metres of every city coordinates.
- Add the hotel name and the country as additional information for each city in the map.
-
The analyses were performed using the OpenWeatherMap Weather API in metric units and Geoapify Place API by
accommodation.hotel
category, and correlation checked by Linear Reression method. -
Following programming languages, software, and libraries were used in this project:
python v.3.9.13
jupyter notebook v.6.4.12
Visual Studio v.1.73.1
PowerPoint v.16.0.14026.20298
pandas v.1.4.4
SciPy v.1.9.3
Matplotlib v.3.6.0
citipy v.0.0.5
NumPy v.1.23.4
GeoViews v.1.9.5
bokeh v.3.0.2
hvplot v.0.8.2
- The project header GIF has been designed by powerpoint and
photopea.com
using assets fromFreepik.com
(include: grass, tourists and tree).
Before running WeatherPy and VacationPy, you will need API keys. Create an api_keys.py file in the same directory containing:
# OpenWeatherMap API Key
weather_api_key = "YOUR KEY HERE"
# Geoapify API Key
geoapify_key = "YOUR KEY HERE"
Corrolation Between latitute of 553 cities and their maximum temprature, humidity, cloudiness, and wind speed are shown in the following figures.
Figures [2] to Figures [5] illustrate the relation of latitude for 553 cities and their maximum temperature, humidity, cloudiness, and wind speed with linear regression in the Northern Hemisphere
and Southern Hemisphere
.
The above figure shows a strong correlation with r2=0.84 for Northern Hemisphere and a moderate correlation with r2=0.57 for Southern Hemisphere. this means by moving away from the equator the temperature decreases.
Figure [3] to Figure [5] visualize a weak correlation between humidity
, cloudiness
, and wind speed
with latitude for both Northern Hemisphere and Southern Hemisphere. Therefore, we cannot hypothesize that by increasing latitude these properties vary too significantly.
Figures [6] exemplify every city in the WeatherPy section Data Frame.
After narrow down the DataFrame to ideal weather condition, keep humidity ,and finding relative hotel located within 10,000 metres of every city coordinates , new DataFrame result shows in Table[1]. also, Figures [7] shows these detail.
Table [2] and Figures [8] show the result after cleaning No hotel found city from DataFrame.
[1] Trilogy Education Services, a 2U, Inc. brand.