I created a website that compares longitudinal observations of temperature, wind speed, humiditiy, and cloudiness, then used the data I collected to find the vacation spots with the perfect weather.
Website hosted by github pages: https://catherineluquire.github.io/API-Weather-Visualization/
- Python
- matplotlib
- pandas
- json-normalize
- numpy
- requests
- time
- pprint
- json
- scipy.stats
- linregress
- citipy
- ipywidgets.embed
- embed_minimal_html
- os
- Gmaps
- HTML/CSS
- Bootstrap
Create api_keys.py file within same directory as Jupyter Notebook files to store personal API keys. Within Jupyter Notebooks, from api_keys import weather_api_key and import g_key.
- Use citypy and numpy to find cities closest to randomly generated latitude and longitude coordinates. Loop through cities, performing API calls and appending relevant data to empty lists.
- Create a dictionary from the newly generated lists of data and convert to dataframe. Clean data to get it in workable condition.
- Export dataframe to a CSV.
- Import csv file from previous step and write function to create plots comparing latitude and weather measurements, and function to compare weather measurements by hemisphere and absolute latitude with linear regression.
- Import csv file from step 1 into dataframe and use gmaps to create heatmap to visualize high humidity. Save map as figure.
- Clean dataframe to find cities with temperature between 70-80 degress, clear skies, windspeed less than 10mph, and less than 100% humidity. Loop through dataframe, performing API calls with gmaps to find hotels within 5000 meters of the geocoordinates and add to dataframe.
- Use newly generated hotel info to add hotel markers to the heatmap containing hotel name, city, and country. Save map as figure.
Use HTML, CSS, and bootstrap to build website exploring previously created charts and maps, including an HTML data table. Deploy via Github Pages.