CLI reference

Auto-generated from the sjvair command-line application.

sjvair

SJVAir data download CLI.

Usage

sjvair [OPTIONS] COMMAND [ARGS]...

Options

--version

Show the version and exit.

--base-url <base_url>

Override API base URL.

--api-key <api_key>

API key for authenticated requests.

--timeout <timeout>

Request timeout in seconds.

--quiet

Suppress informational output.

--force

Overwrite existing output file.

--tz <tz>

IANA timezone (e.g. America/Los_Angeles) for naive timestamps passed to –timestamp/–start/–end. Timestamps with an explicit UTC offset are unaffected. Omit to treat naive timestamps as UTC.

Environment variables

SJVAIR_BASE_URL

Provide a default for --base-url

SJVAIR_API_KEY

Provide a default for --api-key

SJVAIR_TIMEOUT

Provide a default for --timeout

SJVAIR_TZ

Provide a default for --tz

calenviroscreen4

CalEnviroScreen 4.0 census tract scores.

Usage

sjvair calenviroscreen4 [OPTIONS]

Options

--year <year>
--county <county>
--city <city>
--zip <zip_code>
--tract <tract>
--urban <urban>
--region-id <region_id>
--output <output_path>
--format <fmt>
Options:

csv | json | yaml

calenviroscreen5

CalEnviroScreen 5.0 census tract scores.

Usage

sjvair calenviroscreen5 [OPTIONS]

Options

--county <county>
--city <city>
--zip <zip_code>
--tract <tract>
--urban <urban>
--region-id <region_id>
--output <output_path>
--format <fmt>
Options:

csv | json | yaml

calheatscore

CalEPA CalHeatScore daily ZIP-code heat-risk scores.

Usage

sjvair calheatscore [OPTIONS]

Options

--zip <zipcode>
--date <date>
--output <output_path>
--format <fmt>
Options:

csv | json | yaml

ceidars

CEIDARS facility emissions data.

Usage

sjvair ceidars [OPTIONS]

Options

--county <county>
--city <city>
--zip <zip_code>
--tract <tract>
--urban <urban>
--region-id <region_id>
--output <output_path>
--format <fmt>
Options:

csv | json | yaml

forecasts

SJVAPCD daily air quality forecasts, by SJV county zone.

Usage

sjvair forecasts [OPTIONS]

Options

--date <date>

Forecast date (YYYY-MM-DD); defaults to current + future.

--issued-date <issued_date>

Date the forecast was issued (YYYY-MM-DD).

--county <county>

Filter by county name.

--city <city>

Filter by city name.

--zip <zip_code>

Filter by ZIP code.

--tract <tract>

Filter by census tract FIPS code.

--urban <urban>

Filter by urban area name.

--region-id <region_id>

Filter by region sqid.

--output <output_path>
--format <fmt>
Options:

csv | json | yaml

hms

NOAA Hazard Mapping System smoke and fire data.

Usage

sjvair hms [OPTIONS] COMMAND [ARGS]...

fire

Download HMS fire point records.

Usage

sjvair hms fire [OPTIONS]

Options

--date <date>

YYYY-MM-DD; defaults to today.

--county <county>

Filter by county name.

--city <city>

Filter by city name.

--zip <zip_code>

Filter by ZIP code.

--tract <tract>

Filter by census tract FIPS code.

--urban <urban>

Filter by urban area name.

--region-id <region_id>

Filter by region sqid.

--output <output_path>
--format <fmt>
Options:

csv | json | yaml

smoke

Download HMS smoke plume records.

Usage

sjvair hms smoke [OPTIONS]

Options

--date <date>

YYYY-MM-DD; defaults to today.

--county <county>

Filter by county name.

--city <city>

Filter by city name.

--zip <zip_code>

Filter by ZIP code.

--tract <tract>

Filter by census tract FIPS code.

--urban <urban>

Filter by urban area name.

--region-id <region_id>

Filter by region sqid.

--output <output_path>
--format <fmt>
Options:

csv | json | yaml

map

Static map image generation.

Usage

sjvair map [OPTIONS] COMMAND [ARGS]...

create

Render a single static map image, live or as of a historical timestamp.

Usage

sjvair map create [OPTIONS]

Options

--type <entry_type>

Required Entry type, e.g. pm25.

--region <regions>

Region ID or name. Repeatable.

--county <county>

Shortcut for –region, resolved by type. Only one region filter at a time.

--city <city>

Shortcut for –region, resolved by type.

--zip <zip_code>

Shortcut for –region, resolved by type.

--tract <tract>

Shortcut for –region, resolved by type (FIPS).

--urban <urban>

Shortcut for –region, resolved by type (urban-area name).

--buffer <buffer>

Pad the viewport around –region (<=1.0 = fraction, >1.0 = meters).

--bbox <bbox_str>

Manual viewport “west,south,east,north”.

--scope <scope>

Query filter: strict region polygon, or everything in the viewport.

Options:

region | viewport

--timestamp <timestamp>

ISO 8601 timestamp for a historical snapshot. Omit for live data. UTC unless it has an explicit offset or –tz is set.

--location <location>

Only show monitors at this location. Omit to show both (filtered client-side; the API has no location filter of its own).

Options:

inside | outside

--legend, --no-legend

Show/hide the AQI color legend.

--timestamp-label, --no-timestamp-label

Show/hide the burned-in timestamp.

--width <width>
--height <height>
--marker-size <marker_size>

Monitor marker size, in points^2 (matplotlib scatter s).

--output <output_path>

Required

monitors

Monitor data commands.

Usage

sjvair monitors [OPTIONS] COMMAND [ARGS]...

closest

Up to 3 nearest active monitors with distance and latest entry.

Usage

sjvair monitors closest [OPTIONS]

Options

--type <entry_type>

Required

--lat <lat>

Required

--lon <lon>

Required

--device <device>
--output <output_path>

current

All active monitors with latest entry for the given type.

Usage

sjvair monitors current [OPTIONS]

Options

--type <entry_type>

Required

--device <device>
--output <output_path>
--format <fmt>
Options:

csv | json | yaml

entries

Download monitor entries (bulk export).

Usage

sjvair monitors entries [OPTIONS]

Options

--start-date <start_date>

Required

--end-date <end_date>

Required

--monitor-id <monitor_ids>
--from-csv <from_csv>
--county <county>
--city <city>
--zip <zip_code>
--tract <tract>
--urban <urban>
--region-id <region_id>
--is-sjvair
--scope <scope>
Options:

resolved | expanded

--period-months <period_months>
--workers <workers>
--dry-run
--output <output_path>

Required

--format <fmt>
Options:

csv | json | yaml

get

Get a single monitor by ID.

Usage

sjvair monitors get [OPTIONS] MONITOR_ID

Arguments

MONITOR_ID

Required argument

list

List monitors.

Usage

sjvair monitors list [OPTIONS]

Options

--county <county>
--city <city>
--zip <zip_code>
--tract <tract>
--urban <urban>
--region-id <region_id>
--is-sjvair
--output <output_path>
--format <fmt>
Options:

csv | json | yaml

summaries

Download monitor summaries.

Usage

sjvair monitors summaries [OPTIONS]

Options

--type <entry_type>

Required

--resolution <resolution>

Required

Options:

hourly | daily | monthly | quarterly | seasonal | yearly

--start-date <start_date>

Required

--end-date <end_date>

Required

--monitor-id <monitor_ids>
--county <county>
--city <city>
--zip <zip_code>
--tract <tract>
--urban <urban>
--region-id <region_id>
--is-sjvair
--workers <workers>

Concurrent requests across monitors.

--output <output_path>
--format <fmt>
Options:

csv | json | yaml

pesticides

Pesticide use, notice, and chemical data.

Usage

sjvair pesticides [OPTIONS]

Options

--type <ptype>

Required

Options:

use | notice | chemicals | commodities | products | region-use | region-notice | region-summary

--county <county>
--city <city>
--zip <zip_code>
--tract <tract>
--urban <urban>
--region-id <region_id>
--output <output_path>
--format <fmt>
Options:

csv | json | yaml

regions

Region data commands.

Usage

sjvair regions [OPTIONS] COMMAND [ARGS]...

get

Get a region by ID.

Usage

sjvair regions get [OPTIONS] REGION_ID

Arguments

REGION_ID

Required argument

list

List regions of a given type.

Usage

sjvair regions list [OPTIONS]

Options

--type <region_type>

Required

--county <county>
--city <city>
--zip <zip_code>
--tract <tract>
--urban <urban>
--region-id <region_id>
--output <output_path>
--format <fmt>
Options:

csv | json | yaml

summaries

Download region summaries.

Usage

sjvair regions summaries [OPTIONS]

Options

--type <entry_type>

Required

--resolution <resolution>

Required

Options:

hourly | daily | monthly | quarterly | seasonal | yearly

--start-date <start_date>

Required

--end-date <end_date>

Required

--county <county>
--city <city>
--zip <zip_code>
--tract <tract>
--urban <urban>
--region-id <region_id>
--output <output_path>
--format <fmt>
Options:

csv | json | yaml

tempo

NASA TEMPO satellite air-quality data.

Usage

sjvair tempo [OPTIONS]

Options

--type <ttype>

Required

Options:

products | granules | latest | point | region

--product <product>

TEMPO product: no2, o3tot, hcho, cldo4. Required for all types except products.

--date <date>

Local date (YYYY-MM-DD) to filter granules to.

--is-final

Only final-quality granules (granules type).

--version <version_>

NASA product version (granules type).

--lat <latitude>

Latitude (point type).

--lon <longitude>

Longitude (point type).

--start <start>

Start timestamp, ISO 8601 (point/region types).

--end <end>

End timestamp, ISO 8601 (point/region types).

--county <county>
--city <city>
--zip <zip_code>
--tract <tract>
--urban <urban>
--region-id <region_id>
--output <output_path>
--format <fmt>
Options:

csv | json | yaml

timelapse

Timelapse video generation.

Usage

sjvair timelapse [OPTIONS] COMMAND [ARGS]...

create

Render a sequence of historical map frames and assemble them into a video.

Usage

sjvair timelapse create [OPTIONS]

Options

--type <entry_type>

Required Entry type, e.g. pm25.

--region <regions>

Region ID or name. Repeatable.

--county <county>

Shortcut for –region, resolved by type. Only one region filter at a time.

--city <city>

Shortcut for –region, resolved by type.

--zip <zip_code>

Shortcut for –region, resolved by type.

--tract <tract>

Shortcut for –region, resolved by type (FIPS).

--urban <urban>

Shortcut for –region, resolved by type (urban-area name).

--buffer <buffer>

Pad the viewport around –region (<=1.0 = fraction, >1.0 = meters).

--bbox <bbox_str>

Manual viewport “west,south,east,north”.

--scope <scope>

Query filter: strict region polygon, or everything in the viewport.

Options:

region | viewport

--start <start_str>

Required ISO 8601 start timestamp. UTC unless it has an explicit offset or –tz is set.

--end <end_str>

Required ISO 8601 end timestamp. UTC unless it has an explicit offset or –tz is set.

--interval <interval_str>

Required Duration between frames, e.g. 5m, 1h.

--location <location>

Only show monitors at this location. Omit to show both (filtered client-side; the API has no location filter of its own).

Options:

inside | outside

--fps <fps>
--frames-dir <frames_dir>

Defaults to <output>.frames/.

--legend, --no-legend
--timestamp-label, --no-timestamp-label
--width <width>
--height <height>
--marker-size <marker_size>

Monitor marker size, in points^2 (matplotlib scatter s).

--workers <workers>

Parallel frame-rendering processes (default 1 = sequential). Uses separate processes, not threads, since matplotlib rendering is not thread-safe.

--output <output_path>

Required Output path. Format is inferred from the extension: .gif or .mp4 (default for any other extension).