Skip to main content

noaaplotter

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

📚 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.

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

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

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.0.0

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.0.0
File Size Uploaded Provenance Actions
noaaplotter-1.0.0.tar.gz 38.7 kB With provenance Details for noaaplotter-1.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 79.2 kB

Release files / noaaplotter-1.0.0.tar.gz

Download URL noaaplotter-1.0.0.tar.gz
Size 38.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d0e715c4efa6f168e087e8d83ec0c91e6e41739569ed5a3d94369c558bc89218
BLAKE2b-256 checksum
How to use checksums
db227b0664d522240be9c10e137d911470af8ef18df45bee95d3245285cf73e0
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 Sep 16, 2026.

Transparency log

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

Download URL noaaplotter-1.0.0-py3-none-any.whl
Size 40.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
af6d17a65d0fa142d072d5543283843519575bd84345d922e6bec57ffc03f351
BLAKE2b-256 checksum
How to use checksums
b358b4440127a024586dbc84bec4cf70ea71cdf78efba1d65be4858cef2197e0
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 Sep 16, 2026.

Transparency log

Security for noaaplotter 1.0.0

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.0.0.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 Sep 16, 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