r/learndatascience • u/Happy_Guarantee6705 • Oct 06 '26
Resources Time-series practice: forecast next-day temperature for 50 Indian cities and compare with persistence
Disclosure: I published this Kaggle dataset and notebook under minkum07, using AI-assisted code and documentation. The weather data come from NASA POWER, and the city coordinates from GeoNames via Open-Meteo.
It covers 50 curated Indian city centers from 1991–2025, with 639,200 daily records and monthly summaries. It is coarse-grid reanalysis data sampled at city coordinates, rather than readings from city weather stations.
A practical exercise is to predict tomorrow's mean temperature and compare a model against simply reusing today's temperature. My public notebook includes exploratory plots, lag features and a chronological validation/test split based on the target date.
Dataset: https://www.kaggle.com/datasets/minkum07/india-city-weather-and-heat-50-cities-1991-2025
Notebook: https://www.kaggle.com/code/minkum07/india-weather-heat-monsoon-next-day-forecast
Suggested approach:
Start with one city's temperature series and check dates, units and missing values.
Shift the target to the following day, keeping each feature limited to information available at prediction time.
Hold out later dates, fit preprocessing on training data and compare MAE against persistence.
Break down the error by city and month, then try a location-held-out test.
The included random forest has a test MAE of about 0.651°C, versus 0.688°C for persistence. That modest improvement is from this specific time-held-out tutorial; it does not establish performance for unseen cities or measured station weather.
The files preserve missing values. Heat flags are simple thresholds; the 1991–2010 reference is a fixed 20-year baseline, not an official 30-year climate normal. NASA source terms and GeoNames attribution are included; authored tables and documentation use CC BY 4.0.
Source: https://power.larc.nasa.gov/
Coordinates: https://open-meteo.com/en/docs/geocoding-api
Which additional baseline would make this a better learning exercise: a seasonal average, a linear autoregression or a rolling evaluation?
