Skip to main content

noaaplotter

A python package to create fancy plots with NOAA weather data (stations) and ERA5 reanalysis (by coordinates).

version Python versions CI status Documentation

📚 Docs & API reference: initze.github.io/noaaplotter

Install: pip install noaaplotter

Install

pip install noaaplotter

From source (development)

uv venv
uv pip install -e .          # install this package + all dependencies
# or from GitHub:
uv pip install git+https://github.com/initze/noaaplotter.git

Requirements

matplotlib, numpy, pandas, requests, joblib, tqdm, polars, pyarrow, plotly, python-dotenv, typer (all listed in pyproject.toml and installed automatically).

Quick start (3 steps)

# 1. Download data (no token needed — NOAA data comes from the public
#    NCEI Access Data Service)
noaaplotter download-data -o data/kotzebue.parquet -sid USW00026616 -start 1970-01-01 -end 2021-12-31

# 2. Create a daily plot (temperature vs. climate + precipitation, incl. 7-day rolling sum)
noaaplotter plot-daily -infile data/kotzebue.parquet -start 1992-01-01 -end 1992-12-31 -t_range -45 25 -p_range 50 -save_plot figures/kotzebue_1992.png

# 3. ...or an interactive HTML plot
noaaplotter plot-daily -infile data/kotzebue.parquet -start 1992-01-01 -end 1992-12-31 --engine plotly -save_plot figures/kotzebue_1992.html

Command Line Interface (CLI)

Unified command line interface: noaaplotter <command> [OPTIONS]. Every command supports -h / --help for detailed usage.

noaaplotter download-data

Download weather data to a parquet file.

# NOAA station (no token needed — public NCEI service)
noaaplotter download-data -o data/kotzebue.parquet -sid USW00026616 -start 1970-01-01 -end 2021-12-31

# ERA5 reanalysis by coordinates (open_meteo, no token needed)
noaaplotter download-data -o data/potsdam.parquet --source open_meteo -lat 52.4 -lon 13.05 -start 1980-01-01 -end 2021-12-31
Option Meaning
-o / --output-file output parquet file (required)
-sid / --station-id NOAA station id, e.g. USW00026616 (Kotzebue)
-lat, -lon coordinates for --source open_meteo / cds
-start, -end start / end date, YYYY-MM-DD
-t / --token NOAA token (optional; the public endpoint needs none). Defaults to NOAA_API_TOKEN env / .env if set
--source noaa (default), open_meteo, cds
--datatypes TMIN,TMAX,PRCP,SNOW (NOAA only)
-n_jobs parallel processes (NOAA only)
-loc location name for the output file

Data files are cached: re-running only fetches the missing dates.

The ERA5-backed sources (--source open_meteo / cds) additionally return daily wind columns: WSPD (daily mean 10 m wind speed, m/s) and WDIR (daily dominant direction in degrees, meteorological convention — the direction the wind blows FROM; 0 = north). NOAA station data has no equivalent, so both stay null for --source noaa.

noaaplotter plot-daily

Daily temperature (observed vs. climate mean ± 1σ, with anomaly fills) + precipitation (bars + 7-day rolling sum).

noaaplotter plot-daily -infile data/kotzebue.parquet -start 1992-01-01 -end 1992-12-31 -t_range -45 25 -p_range 50 -save_plot figures/kotzebue_1992.png
noaaplotter plot-daily -infile data/kotzebue.parquet -start 2017-07-01 -end 2018-06-30 --snow_acc --engine plotly -save_plot figures/kotzebue_winter.html
Option Meaning
-infile input parquet/csv (required)
-start, -end plot window, YYYY-MM-DD (end date may be in the future; the plot just stops at the last available data)
-t_range temperature range min max, e.g. -45 25
-p_range max precipitation value (mm)
-s_range max snow accumulation (cm)
--snow_acc show cumulative snowfall (winter season)
-filtersize climate smoothing window in days (default 7)
-figsize figure size in inches width height
-title plot title
-save_plot write the plot (.png for matplotlib, .html for plotly)
--plot open in a browser/GUI
--engine matplotlib (default) or plotly
--full-series plotly only: include the entire observed record in the HTML plot — the view still opens on the selected period (default: plot only the selected period, smaller file)

noaaplotter plot-monthly

Monthly bar chart of temperature or precipitation, with anomaly and trailing mean.

# Absolute values
noaaplotter plot-monthly -infile data/kotzebue.parquet -start 1980-01-01 -end 2021-08-31 -type Temperature -trail 12 -save_plot figures/kotzebue_t.png

# Anomaly from climate (1981-2010)
noaaplotter plot-monthly -infile data/kotzebue.parquet -start 1980-01-01 -end 2021-08-31 -type Precipitation -trail 12 -anomaly -save_plot figures/kotzebue_p_anomaly.png
Option Meaning
-infile input parquet/csv (required)
-start, -end plot window, YYYY-MM-DD
-type Temperature (default) or Precipitation
-trail trailing/rolling mean in months, e.g. 12
-anomaly show anomaly from the climate baseline
-save_plot write the plot (.png / .html)
--engine matplotlib (default) or plotly

noaaplotter plot-stripes

Warming stripes (Ed Hawkins style): one vertical bar per period, coloured by temperature anomaly (cool-blue → white → warm-red).

noaaplotter plot-stripes -infile data/kotzebue.parquet -type Temperature -start 1980-01-01 -end 2018-12-31 -save_plot figures/kotzebue_stripes.png
Option Meaning
-infile input parquet/csv (required)
-start, -end optional window, YYYY-MM-DD (default: full record in the file)
-type Temperature (default) or Precipitation (case-insensitive)
-resolution year (default, one bar per year) or month
-save_plot write the plot (.png / .html)
--engine matplotlib (default) or plotly

noaaplotter plot-heatmap

Activity heatmap (GitHub-style matrix): months on x, one row per year (latest on top).

noaaplotter plot-heatmap -infile data/kotzebue.parquet -type Temperature -scale anomaly -save_plot figures/kotzebue_heatmap_anomaly.png
Option Meaning
-infile input parquet/csv (required)
-type Temperature (default) or Precipitation (case-insensitive)
-scale anomaly (default: deviation from climate mean, red↔white↔blue), percentile (month's rank 0–100 across the record), absolute (raw monthly value; precipitation uses the Blues palette)
-start, -end optional window, YYYY-MM-DD
-save_plot write the plot (.png / .html)
--engine matplotlib (default) or plotly

Examples

Download data

Option 1 — NOAA Daily Summaries via CLI (Kotzebue, 1970-2021)

  • No token required — served by the public NCEI Access Data Service.

noaaplotter download-data -o data/kotzebue.parquet -sid USW00026616 -start 1970-01-01 -end 2021-12-31

Option 2 — NOAA Daily Summaries via browser CSV files of "daily summaries" (https://www.ncdc.noaa.gov/cdo-web/search), values: metric, file type: csv.

Option 3 — ERA5 via CLI (Potsdam, 13.05°E / 52.4°N, 1980-2021 — no token) noaaplotter download-data -o data/potsdam.parquet --source open_meteo -lat 52.4 -lon 13.05 -start 1980-01-01 -end 2021-12-31

Daily Mean Temperature and Precipitation vs. Climate

Entire year 1 January until 31 December (e.g. 1992):

noaaplotter plot-daily -infile data/kotzebue.parquet -start 1992-01-01 -end 1992-12-31 -t_range -45 25 -p_range 50 -save_plot figures/kotzebue_daily_1992.png

Kotzebue daily 1992 — temperature (top) vs. climate ±1σ, precipitation (bottom) with 7-day rolling sum

Monthly aggregates

Temperature, absolute (12-month trailing mean):

noaaplotter plot-monthly -infile data/kotzebue.parquet -start 1980-01-01 -end 2021-08-31 -type Temperature -trail 12 -save_plot figures/kotzebue_monthly_t.png

Kotzebue monthly temperature

Temperature, anomaly from climate (1981-2010):

noaaplotter plot-monthly -infile data/kotzebue.parquet -start 1980-01-01 -end 2021-08-31 -type Temperature -trail 12 -anomaly -save_plot figures/kotzebue_monthly_t_anomaly.png

Kotzebue monthly temperature anomaly

Precipitation, absolute (12-month trailing mean):

noaaplotter plot-monthly -infile data/kotzebue.parquet -start 1980-01-01 -end 2021-08-31 -type Precipitation -trail 12 -save_plot figures/kotzebue_monthly_p.png

Kotzebue monthly precipitation

Warming stripes

One bar per year, coloured by the monthly-mean temperature anomaly (ed Hawkins style):

noaaplotter plot-stripes -infile data/kotzebue.parquet -type Temperature -start 1980-01-01 -end 2018-12-31 -save_plot figures/kotzebue_stripes.png

Kotzebue warming stripes 1980-2018

Activity heatmap (months × years)

Anomaly from the climate mean, red↔white↔blue (white in the centre):

noaaplotter plot-heatmap -infile data/kotzebue.parquet -type Temperature -scale anomaly -save_plot figures/kotzebue_heatmap_anomaly.png

Kotzebue activity heatmap — temperature anomaly

Precipitation (absolute, Blues palette — blue for wet months):

noaaplotter plot-heatmap -infile data/kotzebue.parquet -type Precipitation -scale absolute -save_plot figures/kotzebue_heatmap_precip.png

Kotzebue activity heatmap — precipitation (Blues)

Advanced Usage

Get help for any command

noaaplotter --help
noaaplotter download-data --help
noaaplotter plot-daily --help
noaaplotter plot-monthly --help

Interactive (plotly) plots

Use --engine plotly and save to .html to get interactive plots (zoom, hover, range slider). Daily plots also show a 7-day rolling sum of precipitation.

Python API

The package is a normal Python library as well:

from noaaplotter import NOAAPlotter

n = NOAAPlotter("data/kotzebue.parquet", location="Kotzebue", climate_filtersize=7)
fig = n.plot_weather_series(start_date="1992-01-01", end_date="1992-12-31",
                            show_plot=False, return_plot=True, engine="plotly")
fig.write_html("figures/kotzebue_1992.html")

Metadata

Release files for noaaplotter 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for noaaplotter 1.1.1
File Size Uploaded Provenance Actions
noaaplotter-1.1.1.tar.gz 62.7 kB With provenance Details for noaaplotter-1.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for noaaplotter 1.1.1
File Interpreter ABI Platform Actions
noaaplotter-1.1.1-py3-none-any.whl Python 3 none any Details for noaaplotter-1.1.1-py3-none-any.whl

Total release size: 121.5 kB

Release files / noaaplotter-1.1.1.tar.gz

Download URL noaaplotter-1.1.1.tar.gz
Size 62.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3b80949e968fdbbafa548eba16d8b2e5a2a41a35285f3b7f23be5fd7f0d69991
BLAKE2b-256 checksum
How to use checksums
be8333ac3f95acec0749851f6b0d6c66116a7e6fa4940208f01429010cb04822
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

Release files / noaaplotter-1.1.1-py3-none-any.whl

Download URL noaaplotter-1.1.1-py3-none-any.whl
Size 58.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d42590be2d54ad502a5381397ddc8ffa6ac7aba6d7c18c6c3f8ae0e928d6ff24
BLAKE2b-256 checksum
How to use checksums
5448f6a557dcb0417830b177a97ed263e3ead42a0225564772dd3955e86f4515
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

Security for noaaplotter 1.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for noaaplotter-1.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page