Filters Available For Hotels Recommendation as per location, Required City Range, weather requirements, Temp inputs and avaibility for Future Holiday and Vacation destination Trips In Required City
In this deliverable, created a Python script to visualize the weather of over 500 cities at varying distances from the equator. used the Citipy Python library, the OpenWeatherMap API, and your problem-solving skills to develop a representative model of weather across cities.
- For this part, used the WeatherPy.ipynb Jupyter notebook provided in the starter code ZIP file. The starter code guided through the process of using your Python coding skills to develop a solution that addressed the required functionalities.
- To get started, the code required to generate random geographic coordinates and find the nearest city to each latitude and longitude combination was provided.
Using the OpenWeatherMap API, you retrieved weather data and created scatter plots to examine the relationships between latitude and various weather variables, including temperature, humidity, cloudiness, and wind speed.
For each weather variable against latitude, you computed linear regression to analyze trends. The analysis was divided into Northern Hemisphere (≥0° latitude) and Southern Hemisphere (<0° latitude) to identify any distinct patterns. Scatter plots were created with regression lines, model formulas, and R² values to illustrate these relationships.
To fulfill the first requirement,
used the OpenWeatherMap API to retrieve weather data from the cities list generated in the starter code. Then, created a series of scatter plots to showcase the following relationships:
To fulfill the second requirement,
computed the linear regression for each relationship. The plots were separated into the Northern Hemisphere (greater than or equal to 0 degrees latitude) and the Southern Hemisphere (less than 0 degrees latitude). You may have found it helpful to define a function to create the linear regression plots.
Next, created a series of scatter plots and included the linear regression line, the model's formula, and the r² values. The following plots were generated:
After each pair of plots, explained what the linear regression was modeling, described any relationships noticed, and highlighted other findings you uncovered.
In this deliverable, weather data skills were used to plan future vacations. Additionally, Jupyter notebooks, the geoViews Python library, and the Geoapify API were utilized. applied weather data insights to plan vacations using map visualizations.
Using the geoViews Python library and the Geoapify API, you created a map that displayed points for each city, with point size representing humidity levels.
By filtering the data to meet specific weather criteria (e.g., temperatures between 21-27°C, wind speeds less than 4.5 m/s, and zero cloudiness), you identified cities with ideal weather conditions.
A new DataFrame, hotel_df, was created to store city details and humidity. The Geoapify API was used to locate hotels within 10,000 meters of each city’s coordinates, with additional information on hotel names and countries added to the map’s hover messages.
This project provided a comprehensive approach to analyzing weather data and applying it to practical vacation planning scenarios.
The code needed to import the required libraries and load the CSV file containing the weather and coordinates data for each city created in Part 1 was provided to help get started.
The main tasks involved using the Geoapify API, the geoViews Python library, and Python skills to create map visualizations.
To complete this part of the assignment, the VacationPy.ipynb starter code was opened and the following steps were followed:
-
A map was created, displaying a point for every city in the city_data_df DataFrame, where the size of the point represented the humidity in each city.
-
The city_data_df DataFrame was narrowed down to find ideal weather conditions. For example:
- A maximum temperature lower than 27 degrees but higher than 21 degrees
- Wind speed less than 4.5 m/s
- Zero cloudiness
(Specifications could be adjusted, but a reasonable limit was ensured on the number of rows returned by API requests.)
-
A new DataFrame called hotel_df was created to store the city, country, coordinates, and humidity.
-
For each city, the Geoapify API was used to find the first hotel located within 10,000 meters of the coordinates.
-
The hotel name and the country were added as additional information in the hover message for each city on the map.
Organized Files: In local repository, created a new directory for this assignment, named WeatherPy. Inside this directory, you placed the following files from the
Added a .gitignore File: To prevent sensitive files like api_keys.py from being shared publicly, you created a .gitignore file in your repository. This file included:arduino
Committed Your Changes: used the command git status to review untracked files. added the .gitignore, WeatherPy.ipynb, and VacationPy.ipynb files using git add, then committed and pushed changes. ensured that only WeatherPy.ipynb and VacationPy.ipynb were visible on GitHub, keeping api_keys.py private.