Logo Lanfrica

matamba925/analysis-on-collected-weather-data.

Domain:

environment and energy

Record type:

project
Creator:
mat
Host:
built a Python-based pipeline to extract, transform, and analyze real-time weather data across four major African regional hubs: Lagos, Nairobi, Johannesburg, and Lubumbashi. African Cities Weather ETLTETLThisecthisThisisproject extracts current weather data for Lubumbashi, Lagos, Nairobi, and Johannesburg, transforms it with pandas, and visualizes temperature, humidity, and weather conditions.Files- `week_7.ipynb` is the canonical ETL and analysis notebook.- `weather_week 7.ipynb` is an older raw-data preview and is not required.- `extracted_weather_data1.csv` is the raw snapshot used by the notebook when no API key is configured.- `Cleaned_extracted_weather_data1.csv` is the transformed output generated by the notebook. Requirements- Python 3.9 or newer- Jupyter Notebook or VS Code with the Jupyter extension- Python packages: `pandas`, `requests`, and `matplotlib`- An OpenWeatherMap API key for a fresh extractionInstall the packages with:powershellpython -m pip install pandas requests matplotlib jupyterSet the API key before running the extraction cell. PowerShell:powershell$env:OPENWEATHER_API_KEY = "your-api-key"The notebook reads the key from `OPENWEATHER_API_KEY`. It never stores the key in the notebook. If the variable is not set, the notebook uses the existing `extracted_weather_data1.csv` snapshot instead.Run1. Open `week_7.ipynb`.2. Run the cells from top to bottom.3. With `OPENWEATHER_API_KEY` set, the extraction cell calls the OpenWeatherMap current-weather endpoint over HTTPS and refreshes `extracted_weather_data1.csv`.4. The transformation cells convert Unix timestamps to datetimes, round temperature values, check nulls and duplicates, standardize column names, and create the analysis dataframe.5. The final cell writes `Cleaned_extracted_weather_data1.csv`.Weather values are point-in-time observations and will change between API runs. The summary cell calculates findings from the current dataframe rather than relying on fixed narrative values.## Data schemaThe raw file contains:- `City Name`- `Temperature (C)`- `Feels Like (C)`- `Weather`- `Humidity (%)`- `Wind Speed (m/s)`- `Date and Time`The cleaned file uses lowercase na …