The VacationPy and WeatherPy Analysis project utilizes Python and various APIs to analyze and visualize weather patterns across cities. It combines weather data, geospatial mapping, and key metrics to identify suitable vacation spots based on user preferences.
This project includes two key components:
- WeatherPy: Focused on retrieving and analyzing weather data using OpenWeatherMap API.
- VacationPy: Builds on WeatherPy results to locate vacation spots and create a visual travel itinerary using geospatial data.
| File Name | Description |
|---|---|
WeatherPy.ipynb |
Jupyter Notebook for retrieving and analyzing weather data. |
VacationPy.ipynb |
Jupyter Notebook for identifying and mapping vacation spots. |
api_keys.py |
Python file storing API keys (e.g., OpenWeatherMap, Google). |
.gitignore |
.gitignore to hide the api_keys.py file from public viewing. |
cities.csv |
CSV file containing city data for analysis. |
-
Weather Data Analysis (WeatherPy):
- Fetches weather data for a list of cities using OpenWeatherMap API.
- Analyzes temperature, humidity, cloudiness, and wind speed across cities.
- Filters cities based on desired weather conditions.
-
Vacation Spot Identification (VacationPy):
- Uses filtered weather data to locate ideal vacation spots.
- Incorporates Google Maps API to retrieve nearby hotels and plot them.
-
Geospatial Visualizations:
- Creates maps using gmaps to display weather and vacation spots.
- Visualizes hotel locations on a global scale.
-
Integration of APIs:
- OpenWeatherMap API for weather data.
- Google Maps API for geospatial mapping and hotel searches.
-
Prerequisites:
- Python 3.x
- Jupyter Notebook or JupyterLab
- User generated API keys for GeoApify and OpenWeather
-
Setup:
- Clone this repository or download the project files.
- Install dependencies using the provided
requirements.txtfile:pip install -r requirements.txt
- Add your API keys in an
api_keys.pyfile for:- OpenWeatherMap API
- Google Maps API
-
Run:
-
Open the repository in VSCode
-
Open and run
WeatherPy.ipynbandVacationPy.ipynbsequentially.
-
-
Weather Trends:
- Identified global patterns in temperature, humidity, cloud cover, and wind speed.
- Verified the relationship between latitude and temperature.
-
Vacation Spot Analysis:
- Located vacation spots based on ideal weather conditions.
- Mapped hotels near selected vacation spots for easy visualization.
-
Geospatial Mapping:
- Visualized global weather data and vacation spots using interactive maps.