This repository contains a Jupyter Notebook and SQL script for analyzing weather data.
weather_data_analysis.sql
: SQL queries for analyzing the weather dataset.weather_dataset.ipynb
: Jupyter notebook containing Python analysis of the weather data.1. Weather Data.csv
: the raw weather data
The dataset contains the following columns:
- Date/Time
- Temperature (°C)
- Dew Point Temperature (°C)
- Relative Humidity (%)
- Wind Speed (km/h)
- Visibility (km)
- Pressure (kPa)
- Weather
- Basic statistical analysis of weather parameters
- Correlation between different weather variables
- Frequency of various weather conditions
The SQL script includes queries to:
- Find clear weather records
- Count instances of specific wind speeds
- Check for NULL values
- Rename columns
- Calculate mean visibility
- Find records with specific wind speed and visibility
- Calculate mean values for each weather condition
- Find instances of clear weather with specific humidity or visibility
- Count snow-related weather conditions
The Jupyter Notebook includes Python code to perform the following analyses:
-
Find all records where the weather was exactly clear
- Filters the dataset to show only clear weather conditions
-
Count instances of specific wind speeds
- Determines how many times the wind speed was exactly 4 km/hr
-
Check for NULL values
- Examines the dataset for any missing or null values across all columns
-
Rename columns
- Demonstrates how to rename the "Weather" column to "Weather_Condition"
-
Calculate mean visibility
- Computes the average visibility across the entire dataset
-
Find records with specific wind speed and visibility
- Identifies records where wind speed is greater than 24 km/hr and visibility is equal to 25 km
-
Calculate mean values for each weather condition
- Groups the data by weather condition and calculates the mean of each numeric column
-
Find instances of clear weather with specific humidity or visibility
- Locates records where the weather is clear and relative humidity is greater than 50%, or visibility is above 40 km
-
Count snow-related weather conditions
- Determines the number of weather conditions that include snow
- Run the SQL queries in your preferred SQL environment (e.g., DBeaver).
- Open the Jupyter notebook in Jupyter Lab or Jupyter Notebook to run the Python analysis.