ClimateClimate & Weather

Is Climate Change Affecting Your City? Find Out with Data

Measure climate change locally using historical temperature, precipitation, and extreme event data. Real examples from NYC, London, and Phoenix. Python code to analyze your city.

Ryan Bethencourt
April 20, 2026
10 min read

Climate Change Is Local

Global headlines report that the planet has warmed by roughly 1.2 degrees Celsius since pre-industrial times. That number is real, but it is an average across the entire Earth — including oceans, deserts, and the Arctic. Your city's experience may be very different. Some cities have warmed by twice the global average. Others have seen dramatic changes in rainfall patterns while temperatures shifted only modestly. The only way to know what climate change looks like where you live is to look at the data.

This guide shows you how to access historical climate data for any location, analyze temperature and precipitation trends, identify changes in extreme weather events, and quantify how your city's climate has shifted over the past several decades. Everything uses freely available data and straightforward Python code that you can adapt to your own location.

Note
Climate and weather are different things. Weather is what happens today. Climate is the statistical pattern of weather over decades. To detect climate change, you need at least 30 years of data to separate long-term trends from year-to-year variability. A single hot summer is weather. Twenty years of increasingly hot summers is climate.

Measuring Temperature Trends

The most direct signal of climate change is the trend in average annual temperature. For most locations, this is the easiest metric to compute and the most statistically robust. The approach is simple: download daily temperature data for your location, compute annual averages, and compare decades.

Compare average temperatures by decade
import requests
import numpy as np

API_KEY = "sk-sci-your-api-key"
BASE = "https://api.scirouter.ai/v1"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}

# Get 40 years of monthly temperature data for NYC
response = requests.post(f"{BASE}/climate/history",
    headers=HEADERS,
    json={
        "latitude": 40.7128,
        "longitude": -74.0060,
        "start_date": "1984-01-01",
        "end_date": "2023-12-31",
        "variables": ["temperature_mean"],
        "frequency": "monthly"
    })

data = response.json()["monthly"]

# Group by decade
decades = {
    "1984-1993": [m["temperature_mean"] for m in data
                  if 1984 <= int(m["date"][:4]) <= 1993],
    "1994-2003": [m["temperature_mean"] for m in data
                  if 1994 <= int(m["date"][:4]) <= 2003],
    "2004-2013": [m["temperature_mean"] for m in data
                  if 2004 <= int(m["date"][:4]) <= 2013],
    "2014-2023": [m["temperature_mean"] for m in data
                  if 2014 <= int(m["date"][:4]) <= 2023],
}

print("Decade          Avg Temp (C)   Change vs 1984-93")
print("-" * 52)
baseline = np.mean(decades["1984-1993"])
for decade, temps in decades.items():
    avg = np.mean(temps)
    diff = avg - baseline
    sign = "+" if diff >= 0 else ""
    print(f"{decade}      {avg:>8.2f}       {sign}{diff:.2f}")

For New York City, this analysis typically reveals warming of roughly 0.8-1.2 degrees Celsius between the earliest and most recent decades. The warming is not uniform across seasons — winters tend to warm faster than summers in mid-latitude cities, and nighttime low temperatures rise faster than daytime highs.

Tracking Extreme Heat Days

Average temperature changes tell part of the story, but extremes often matter more for public health, infrastructure, and daily life. The number of days per year exceeding critical temperature thresholds — like 35 degrees Celsius (95 degrees Fahrenheit) — is a practical metric that directly relates to heat stress, energy demand, and mortality risk.

Count extreme heat days per year
import requests

API_KEY = "sk-sci-your-api-key"
BASE = "https://api.scirouter.ai/v1"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}

# Get daily max temperatures for NYC (1990-2023)
response = requests.post(f"{BASE}/climate/history",
    headers=HEADERS,
    json={
        "latitude": 40.7128,
        "longitude": -74.0060,
        "start_date": "1990-01-01",
        "end_date": "2023-12-31",
        "variables": ["temperature_max"],
        "frequency": "daily"
    })

daily = response.json()["daily"]

# Count days above 35C per year
from collections import Counter
hot_days = Counter()
for day in daily:
    if day["temperature_max"] >= 35.0:
        year = int(day["date"][:4])
        hot_days[year] += 1

print("Year  Days >= 35C")
print("-" * 20)
for year in range(1990, 2024):
    count = hot_days.get(year, 0)
    bar = "#" * count
    print(f"{year}    {count:>3}  {bar}")

Precipitation Changes

Temperature gets the headlines, but precipitation changes can have an equally large impact on daily life. Climate change does not simply make it rain more or less — it reshapes rainfall patterns. Many locations see fewer rainy days overall but heavier rain on the days when it does rain. This means both more drought stress between events and more flooding risk during events.

To detect precipitation trends, look at three metrics: total annual rainfall, number of rainy days (days with more than 1 mm of precipitation), and heavy rainfall days (days exceeding the 95th percentile of daily rainfall for the historical period). The ratio between total rainfall and number of rainy days gives you the average intensity per event, which tends to increase with warming as a warmer atmosphere holds more moisture.

Real Examples

New York City: Hotter Summers, Wetter Storms

NYC's average annual temperature has risen by approximately 1.1 degrees Celsius since the 1980s. Summer heat waves are becoming more frequent, with the number of days above 32 degrees Celsius roughly doubling between the 1980s and 2020s. Perhaps more significantly, extreme rainfall events have intensified. The remnants of Hurricane Ida in September 2021 dropped over 80 mm of rain in a single hour in Central Park, shattering the previous hourly record. Heavy rainfall events (above the 95th percentile) have increased by approximately 30% over the past four decades.

London: Milder Winters, Summer Heat Surprises

London has warmed by roughly 1.0 degree Celsius since the 1980s, with the most pronounced warming in winter. Frost days have declined significantly — London now averages roughly half the frost days it experienced in the 1980s. In July 2022, London exceeded 40 degrees Celsius for the first time in recorded history, an event that would have been virtually impossible without climate change according to attribution studies. Winter flooding has become more frequent as warmer Atlantic air carries more moisture across the UK.

Phoenix: Already Hot, Getting Hotter

Phoenix, already one of the hottest cities in the US, has seen its extreme heat season lengthen dramatically. The number of days above 43 degrees Celsius (110 degrees Fahrenheit) has roughly tripled since the 1980s. In 2023, Phoenix experienced 31 consecutive days above 43 degrees Celsius, a record that highlighted the compounding effects of climate warming and urban heat island. Nighttime temperatures, which determine whether the human body can recover from daytime heat, have risen even faster than daytime highs.

Tip
When comparing your city to global averages, remember that urban heat island effects can amplify warming trends. If your city has grown significantly over the analysis period, part of the warming you observe may be due to urbanization rather than global climate change. Compare your trend to nearby rural stations or ERA5 data to separate the two effects.

Taking Action with Data

Understanding your local climate trends is the first step toward adaptation. Once you know how your city's climate is changing, you can make informed decisions:

  • Homeowners: Assess whether your HVAC system is sized for the hotter summers ahead, evaluate flood risk from intensifying rainfall, and plan landscaping for changing conditions
  • Businesses: Factor climate trends into long-term site selection, supply chain planning, and infrastructure investment decisions
  • Researchers: Use historical data to calibrate climate models, validate projections, and communicate risks to decision-makers with location-specific evidence
  • Developers: Build climate-aware applications that help users understand and adapt to local climate trends

Next Steps

To continue exploring climate data and weather prediction:

Ready to analyze your city's climate data? Open the Weather Forecaster Studio to explore forecasts, or get a free API key to query historical climate data for any location on Earth.

Frequently Asked Questions

How can I tell if climate change is affecting my city?

The most straightforward approach is to compare temperature averages across decades. Pull daily temperature data for your city from ERA5 or NASA POWER, compute the average annual temperature for 1981-2000 and for 2001-2020, and compare. Most cities show warming of 0.5-2.0 degrees Celsius between these periods. You can also look at the frequency of extreme heat days (above 35 degrees C), the number of frost days, and changes in annual precipitation totals. These metrics are easy to compute and provide a clear quantitative picture of local climate change.

What data do I need to analyze local climate trends?

At minimum, you need daily temperature (mean, max, min) and precipitation data spanning at least 30 years. Ideally 40-50 years for robust trend detection. This data is freely available from NASA POWER (1981-present) or ERA5 (1940-present) for any coordinates on Earth. For more detailed analysis, add wind speed, humidity, and solar irradiance. Station observations from NOAA GHCN are the gold standard for locations near weather stations, as they provide actual measurements rather than modeled estimates.

Is 30 years of data enough to detect climate trends?

Thirty years is the World Meteorological Organization standard for defining a climate normal, and it is generally sufficient to detect temperature trends in most locations. However, natural variability (El Nino cycles, Atlantic Multidecadal Oscillation, volcanic eruptions) can create multi-year fluctuations that complicate trend detection over shorter periods. For precipitation trends, which are noisier than temperature, 40-50 years of data provides more robust results. Statistical significance testing (like the Mann-Kendall trend test) helps determine whether an observed trend is distinguishable from natural variability.

Are some cities warming faster than others?

Yes, significantly. Arctic cities are warming 2-4 times faster than the global average due to polar amplification. Inland cities warm faster than coastal cities because oceans absorb heat and moderate temperature extremes. Cities with rapid urbanization experience additional warming from the urban heat island effect, which adds 1-3 degrees Celsius on top of background climate warming. Desert cities face compounding effects where warming increases evaporation, reduces soil moisture, and further amplifies temperatures through a positive feedback loop.

How do I account for the urban heat island effect in climate analysis?

The urban heat island (UHI) effect causes cities to be warmer than surrounding rural areas due to concrete, asphalt, waste heat, and reduced vegetation. When analyzing climate trends in cities, UHI can inflate apparent warming if the weather station was originally in a rural area that was later surrounded by development. To separate UHI from climate change, compare your city&apos;s trend to nearby rural stations or to ERA5 grid data (which partially controls for UHI). If the city is warming faster than the surrounding region, the difference is likely UHI contribution.

Try this yourself

500 free credits. No credit card required.