Hey, I am posting this on behalf of my class fellow. We are new to the Wolfram language and he did all this. I am not sure he did right or not. He told me about this whole process. I want to try it but before this, can anyone tell me if it's right or not? This is a new field for me and making time for new skills is a bit tough for me so I am posting it here.
He said "I recently worked on a fun little project using the Wolfram Language to explore local weather trends. The idea was simple: analyze how daily temperature and precipitation changed over the past year for my city and create some cool visualizations to spot patterns. I used the WeatherData function to pull in the data, then cleaned it up with interpolation to handle any missing values. From there, I calculated things like monthly averages, yearly totals, and even temperature anomalies to find out which days were really out of the ordinary.
One of my favorite parts was creating the visualizations. I used DateListPlot to map out daily trends, built bar charts for average monthly temperatures, and even made a heatmap for precipitation intensity. The Wolfram Language makes it so easy to go from raw data to beautiful visuals! I noticed a few interesting things, like a clear temperature spike in the summer (hello, heatwaves!) and way more rain than usual in the spring, which made me wonder about its connection to the flooding we saw locally.
Next steps? I’m thinking about expanding the project to compare weather trends across multiple cities or even turning it into an interactive dashboard with CloudDeploy so others can explore the data too. It’s been a fun way to experiment with time series tools and get more comfortable with data analysis in Wolfram. Here is the detail of what I have done till:
First, I used the WeatherData function to pull daily temperature and precipitation information for New York City for the year 2023:
location = Entity["City", {"NewYork", "NewYork", "UnitedStates"}];
startDate = DateObject[{2023, 1, 1}];
endDate = DateObject[{2023, 12, 31}];
temperatureData = WeatherData[location, "Temperature", {startDate, endDate, "Day"}];
precipitationData = WeatherData[location, "Precipitation", {startDate, endDate, "Day"}];
After that, I turned the data into time-series objects and filled in any gaps with interpolation:
tempts = TimeSeries[temperatureData];
precipTS = TimeSeries[precipitationData];
tempTS = TimeSeriesResample[tempTS, "Interpolation"];
precipTS = TimeSeriesResample[precipTS, "Interpolation"];
To make sense of the data, I calculated the monthly averages for temperature and the total rainfall for the year:
monthlyTemp = TimeSeriesAggregate[tempTS, "Month", Mean];
totalPrecip = TimeSeriesAggregate[precipTS, "Year", Total];
This is where things got really fun! I used DateListPlot to visualize trends over time and bar charts for monthly summaries:
Daily Temperature Trend:
DateListPlot[tempTS, PlotTheme -> "Detailed",
PlotLabel -> "Daily Temperature Over 2023"]
Monthly Temperature Averages:
BarChart[monthlyTemp[[All, 2]],
ChartLabels -> Placed[monthlyTemp[[All, 1]], "Below"],
PlotLabel -> "Average Monthly Temperature"]
Precipitation Heatmap:
DateListPlot[precipTS, ColorFunction -> "Rainbow",
PlotLabel -> "Daily Precipitation Intensity"]
From my analysis, I spotted some interesting trends:
- A noticeable rise in temperature during the summer, which lined up with recent news about heatwaves.
- Significant rainfall in early spring, matching reports of local flooding.
- Clear seasonal patterns, along with some unusual deviations that could use further investigation.
Looking ahead, I would love to compare weather trends in different cities to see how they differ across locations or even create an interactive dashboard using CloudDeploy so others can explore the data themselves."
Any help would be appreciated.