CLI tool for plotting Remote Sensing data, designed for Agent.
Project description
rsplot
rsplot is an Agent-oriented command-line tool for plotting remote-sensing and
air-quality data. It is designed to provide a small, stable CLI surface for
tianpu-agent.
Installation
Run directly with uvx:
uvx rsplot --help
Or install it in a project environment:
uv add rsplot
uv run rsplot --help
For local development:
git clone https://github.com/yaoyhu/rsplot.git
cd rsplot
uv sync
uv run rsplot --help
Configuration
rsplot does not ship site-specific data paths. Configure local satellite,
station, boundary, and font paths with a TOML file:
mkdir -p ~/.config/rsplot
cp config.example.toml ~/.config/rsplot/config.toml
Then edit ~/.config/rsplot/config.toml:
[paths]
geojson_dir = "/path/to/geojson"
font_dir = "/path/to/fonts"
# hcho_cmap_file = "/path/to/256x3_rgb_table.txt"
[paths.data_dirs]
no2 = "/path/to/NO2"
o3 = "/path/to/O3"
o3pr = "/path/to/O3PR"
hcho = "/path/to/HCHO"
guokong = "/path/to/guokong_combine"
# Optional satellite basemap key. Leave commented unless you have a real key.
# [tianditu]
# api_key = "your-real-key"
You can also point to a different config file:
export RSPLOT_CONFIG="/path/to/rsplot.toml"
Environment variables override TOML values:
export TIANDITU_API_KEY="your-key"
export RSPLOT_GEOJSON_DIR="/path/to/geojson"
export RSPLOT_FONT_DIR="/path/to/fonts"
export RSPLOT_DATA_DIR_NO2="/path/to/NO2"
export RSPLOT_DATA_DIR_O3="/path/to/O3"
export RSPLOT_DATA_DIR_O3PR="/path/to/O3PR"
export RSPLOT_DATA_DIR_HCHO="/path/to/HCHO"
export RSPLOT_DATA_DIR_GUOKONG="/path/to/guokong_combine"
export RSPLOT_HCHO_CMAP_FILE="/path/to/256x3_rgb_table.txt"
Command-line directory options, such as --data-dir, take precedence for the
command being run. If no TianDiTu API key is configured, use --basemap none
to avoid requesting satellite tiles.
Usage
The examples below assume data paths are configured and readable.
# Show available commands and options.
rsplot --help
# Plot a single-day TROPOMI raster.
rsplot raster 合肥 20260115 -p no2 -o ./logs/hcho/raster_city_jiujiang_hcho.png
# Plot a 30-day TROPOMI window mean.
rsplot raster 安徽 20260131 -p hcho --days 30 -o hcho_anhui_202601.png
# Plot a TROPOMI ozone-profile tropospheric column raster.
rsplot raster 安徽 20260227 -p o3pr -o o3pr_anhui_20260227.png
# Plot an explicit TROPOMI date range.
rsplot raster 长三角 20260101-20260131 -p no2 -o no2_yrd_202601.png
# Plot national monitoring station observations.
rsplot station 合肥 2026041415 --var O3 -o station_hefei_o3.png
# Overlay satellite raster data and station observations.
rsplot overlay 合肥 2026041415 -p no2 --var NO2 -o overlay_hefei_no2.png
# Plot an FNR regime map with the default 7-day window.
rsplot fnr 合肥 20260114 -o fnr_hefei.png
# Plot an FNR regime map with an explicit date range.
rsplot fnr 长三角 20260101-20260130 -o fnr_yrd_202601.png
# Override FNR regime thresholds for agent-driven sensitivity tests.
rsplot fnr 合肥 20260114 --voc-threshold 0.8 --nox-threshold 1.8 --display-max 5 -o fnr_hefei_sensitivity.png
When -o/--output is provided, rsplot writes the image to that path and also
writes a JSON sidecar with the same base name.
License
This project is distributed under the license in LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rsplot-0.2.5.tar.gz.
File metadata
- Download URL: rsplot-0.2.5.tar.gz
- Upload date:
- Size: 55.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
baa6d407c0582b4d056ed61a326eb2c3b79fa4016c9cd3ca5e2e6d907e5347f8
|
|
| MD5 |
f847212f0d61647db384a73ae7bffdbf
|
|
| BLAKE2b-256 |
9b0cdd40852d7f7027199979b437e2e210f6e2543f3e3d68cc0f94846552f8f8
|
File details
Details for the file rsplot-0.2.5-py3-none-any.whl.
File metadata
- Download URL: rsplot-0.2.5-py3-none-any.whl
- Upload date:
- Size: 76.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0acb4f43fc9509bafa01601d6b2000113d5874e5efd8037c081806c5755e798a
|
|
| MD5 |
9f3dfa6df4008b522c613142f8da8513
|
|
| BLAKE2b-256 |
f6fdfe02f16e2816c7c3e04e4c153ef6067933fbef5697b24bc8362299c08dc4
|