Purpose: This project compares precipitation levels across two U.S. cities (Seattle and Portland) between 2018 and 2022 to analyze rainfall patterns.
This project explores the question: Does it rain more in Seattle or in Portland?
In this analysis, we will use daily precipitation data from the National Centers for Environmental Information (NOAA) for the years 2018–2022 to compare rainfall patterns between these two cities. (link is provided below)
We will:
- Explore and clean the datasets.
- Handle missing values.
- Generate visualizations and draw observations.
- Compare rainfall frequency and total rainfall intensity between the two cities.
By the end of this project, we will determine which city is wetter overall, "Seattle" or "Portland", based on total amount of precipitation.
Weather-project/
├── weather/ # Core project folder
├── code/ # Jupyter notebooks and Python scripts
├── data/ # Raw and processed data
├── License # Project license
├── Weather Report.pdf # Generated report and visualizations
├── requirements.txt # Dependencies
└── README.md # Project documentation
The precipitation data sets were downloaded from the National Centers for Environmental Information NOAA Climate Online Data tool.
Seattle data source:
https://raw.githubusercontent.com/brian-fischer/DATA-5100/refs/heads/main/weather/seattle_rain.csv
Portland data source:
https://raw.githubusercontent.com/anushkanaidu/Weather-Data-Project/refs/heads/main/weather/portland_rainfall.csv
To run the code, install pandas, numpy, seaborn and matplotlib.
The analysis for this project is done in one notebook: weather/code/weather.ipynb.
Follow the steps below to reproduce the results.
-
Import Libraries
Load all the required Python libraries (pandas,numpy,seaborn,matplotlib). -
Load Data
Read the Seattle and Portland CSV files from thedata/folder and check the first few rows. -
Clean Data
Convert theDATEcolumn to datetime, keep only the needed columns (STATION,DATE,PRCP), and fill missing precipitation values with the average rainfall for each city. -
Combine Data
Merge both datasets using theDATEcolumn with an outer join so all dates from both cities are included. -
Reshape Data
Change the data to a long format so it’s easier to compare and plot. -
Visualize Results
Create graphs to compare daily, monthly, and seasonal rainfall between Seattle and Portland. -
Findings
Summarize which city rains more often and which has heavier rainfall overall.
Note:
Run the cells from top to bottom in the notebook. Each step depends on the previous one.
Based on the analysis of precipitation data for Seattle and Portland from 2018 to 2022, we can draw the following conclusions:
Total Rainfall: Portland received more total rainfall than Seattle during this period.
Frequency vs. Intensity: Seattle experienced rain on more days overall, but the rainfall was usually lighter. In contrast, Portland had fewer rainy days, but when it rained, the precipitation was heavier on average.
Seasonal Patterns: Both cities showed clear seasonal trends where it rained more during the winter months and less during the summer. However, Portland had higher rainfall peaks during the wet season compared to Seattle.
In summary: Seattle tends to have rain more often but in smaller amounts, while Portland has fewer rainy days with heavier rainfall, leading to a higher total precipitation overall.
Anushka Naidu Maddisetty – (https://github.com/anushkanaidu)
This project is licensed under the MIT License – see the (LICENSE) file for details.
Tools and Libraries Used:
Data Source:
Inspiration and Guidance:
- Seattle University DATA-5100 (Foundations of Data Science) project template.
- Course instructor and peers for feedback and support.