Tools
Work with time series
Example of tools¶
Bellow a quick presentation of the available series analysis tools.
Select data over a location and time¶
Usage: pvgis series select [OPTIONS] {time_series} {longitude} {latitude}
[timestamps]
 Select time series over a location
â•─ Arguments ──────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ * longitude <float range> Longitude in decimal degrees ranging in [-180, 360]. If ranging in [0, 360], │
│ consider the `--convert-longitude-360` option. │
│ [required] │
│ * latitude <float range> Latitude in decimal degrees ranging in [-90, 90] [required] │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
â•─ External time series data ──────────────────────────────────────────────────────────────────────────────────────────╮
│ * time_series <path> A time series dataset (any format supported by Xarray) [required] │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
â•─ Timestamps ─────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ timestamps <parse_timestamp_series> Quoted date-time strings of data to extract from series, example: │
│ '2112-12-21, 2112-12-21 12:21:21, 2112-12-21 21:12:12'' │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
â•─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --resample-large-series --no-resample-large-series [default: no-resample-large-series] │
│ --log -l <int> Enable logging [default: 0] │
│ --data-source <str> Data source text to print in the footer of the │
│ plot. │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
â•─ External time series data ──────────────────────────────────────────────────────────────────────────────────────────╮
│ --time-series-2 <path> A time series dataset (any format supported by Xarray) │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
â•─ Timestamps ─────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --start-time,--st <parse_timestamp> Start timestamp of the period. Overrides the `timestamps` parameter! │
│ --periods <int> Number of timestamps to generate │
│ --frequency <str> A common date/time frequency unit optionally with a multiples number, │
│ such as H(hourly), min(utely), S(econdly), D(aily), W(eekly), M(onth │
│ end), Y(early) or 30min. See Pandas time series offset aliases. │
│ --end-time,--et <parse_timestamp> End timestamp of the period. Overrides the `timestamps` parameter! │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
â•─ Helpers ────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --convert-longitude-360 --no-convert-longitude-360 Convert range of longitude values to [0, 360] │
│ [default: no-convert-longitude-360] │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
â•─ External time series selection ─────────────────────────────────────────────────────────────────────────────────────╮
│ --variable <str> Variable name │
│ --variable-2 <str> Variable name │
│ --coordinate <str> Column name for wavelength values in │
│ `wavelength` CSV input │
│ --neighbor-lookup <none|pad|backfill|nearest> Enable nearest neighbor (inexact) lookups. │
│ Read Xarray manual on │
│ nearest-neighbor-lookups │
│ --tolerance <float> Maximum distance between original & new │
│ labels for inexact matches. Read Xarray │
│ manual on nearest-neighbor-lookups │
│ [default: 0.1] │
│ --mask-and-scale --no-mask-and-scale Mask and scale the series │
│ [default: no-mask-and-scale] │
│ --in-memory --no-in-memory Use in-memory processing │
│ [default: no-in-memory] │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
â•─ Solar irradiance spectrum ──────────────────────────────────────────────────────────────────────────────────────────╮
│ --filter-coordinate --no-filter-coordinate Limit the range of input data by filtering the requested │
│ Xarray `coordinate`. See options `minimum`, `maximum`. │
│ [default: no-filter-coordinate] │
│ --minimum <float> Minimum wavelength for spectral irradiance range │
│ --maximum <float> Maximum {spectral_irradiance_wavelength_limit_typer_help} │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
â•─ Statistics ─────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --statistics --no-statistics Calculate and display summary statistics [default: no-statistics] │
│ --groupby <str> Group statistics, ex. M or 3h. A number and date/time unit : (Y)ear, │
│ (S)eason, (M)onth, (D)ay, (W)eek, (h)our. See Xarray's group-by │
│ operations. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
â•─ > Input : < Output ─────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --output-filename <path> Output filename for the generated figure │
│ --variable-name-as-suffix --no-variable-name-as-suffix Suffix the output filename with the variable │
│ name │
│ [default: variable-name-as-suffix] │
│ --rounding-places -r <int> Number of digits to round results to │
│ [default: 3] │
│ --verbose -v <int> Show details while executing commands │
│ [default: 0] │
│ --quiet Do not print out the output │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
â•─ Plotting ───────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --uniplot --no-uniplot Plot the PV power output time series in the terminal │
│ [default: no-uniplot] │
│ --lines --no-lines Symbol for plotting data points with uniplot [default: lines] │
│ --title <str> Title for the Uniplot [default: Selected data] │
│ --unit <str> Unit for the Uniplot [default: Unit] │
│ --terminal-width-fraction <float> Fraction of number of columns of the current terminal, ex. 0.9 │
│ [default: 0.9] │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
â•─ Metadata ───────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --fingerprint,--fp Fingerprint the output time series │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Save result into a plot¶
Usage: pvgis series plot [OPTIONS] {time_series} {longitude} {latitude}
[timestamps]
📈 Plot time series
â•─ Arguments ──────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ * longitude <float range> Longitude in decimal degrees ranging in [-180, 360]. If ranging in [0, 360], │
│ consider the `--convert-longitude-360` option. │
│ [required] │
│ * latitude <float range> Latitude in decimal degrees ranging in [-90, 90] [required] │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
â•─ External time series data ──────────────────────────────────────────────────────────────────────────────────────────╮
│ * time_series <path> A time series dataset (any format supported by Xarray) [required] │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
â•─ Timestamps ─────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ timestamps <parse_timestamp_series> Quoted date-time strings of data to extract from series, example: │
│ '2112-12-21, 2112-12-21 12:21:21, 2112-12-21 21:12:12'' │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
â•─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --default-dimension <str> [default: time] │
│ --ask-for-dimension --no-ask-for-dimension [default: ask-for-dimension] │
│ --resample-large-series --no-resample-large-series [default: no-resample-large-series] │
│ --width <int> [default: 16] │
│ --height <int> [default: 3] │
│ --tufte-style --no-tufte-style Use Tufte-style in the output │
│ [default: no-tufte-style] │
│ --data-source <str> Data source text to print in the footer of the │
│ plot. │
│ --log -l <int> Enable logging [default: 0] │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
â•─ Timestamps ─────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --start-time,--st <parse_timestamp> Start timestamp of the period. Overrides the `timestamps` parameter! │
│ --periods <int> Number of timestamps to generate │
│ --frequency <str> A common date/time frequency unit optionally with a multiples number, │
│ such as H(hourly), min(utely), S(econdly), D(aily), W(eekly), M(onth │
│ end), Y(early) or 30min. See Pandas time series offset aliases. │
│ --end-time,--et <parse_timestamp> End timestamp of the period. Overrides the `timestamps` parameter! │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
â•─ Helpers ────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --convert-longitude-360 --no-convert-longitude-360 Convert range of longitude values to [0, 360] │
│ [default: no-convert-longitude-360] │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
â•─ External time series selection ─────────────────────────────────────────────────────────────────────────────────────╮
│ --variable <str> Variable name │
│ --neighbor-lookup <none|pad|backfill|nearest> Enable nearest neighbor (inexact) lookups. │
│ Read Xarray manual on │
│ nearest-neighbor-lookups │
│ [default: nearest] │
│ --tolerance <float> Maximum distance between original & new │
│ labels for inexact matches. Read Xarray │
│ manual on nearest-neighbor-lookups │
│ [default: 0.1] │
│ --mask-and-scale --no-mask-and-scale Mask and scale the series │
│ [default: no-mask-and-scale] │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
â•─ > Input : < Output ─────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --output-filename <path> Output filename for the generated figure │
│ --variable-name-as-suffix --no-variable-name-as-suffix Suffix the output filename with the variable │
│ name │
│ [default: variable-name-as-suffix] │
│ --verbose -v <int> Show details while executing commands │
│ [default: 0] │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
â•─ Metadata ───────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --fingerprint,--fp Fingerprint the output time series │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Print results into the terminal¶
Usage: pvgis series uniplot [OPTIONS] {time_series} {longitude} {latitude}
[timestamps]
ï„ Plot time series in the terminal
â•─ Arguments ──────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ * longitude <float range> Longitude in decimal degrees ranging in [-180, 360]. If ranging in [0, 360], │
│ consider the `--convert-longitude-360` option. │
│ [required] │
│ * latitude <float range> Latitude in decimal degrees ranging in [-90, 90] [required] │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
â•─ External time series data ──────────────────────────────────────────────────────────────────────────────────────────╮
│ * time_series <path> A time series dataset (any format supported by Xarray) [required] │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
â•─ Timestamps ─────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ timestamps <parse_timestamp_series> Quoted date-time strings of data to extract from series, example: │
│ '2112-12-21, 2112-12-21 12:21:21, 2112-12-21 21:12:12'' │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
â•─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --coordinate <str> │
│ --resample-large-series --no-resample-large-series [default: no-resample-large-series] │
│ --data-source <str> Data source text to print in the footer of the plot. │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
â•─ External time series data ──────────────────────────────────────────────────────────────────────────────────────────╮
│ --time-series-2 <path> A time series dataset (any format supported by Xarray) │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
â•─ Timestamps ─────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --start-time,--st <parse_timestamp> Start timestamp of the period. Overrides the `timestamps` parameter! │
│ --end-time,--et <parse_timestamp> End timestamp of the period. Overrides the `timestamps` parameter! │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
â•─ External time series selection ─────────────────────────────────────────────────────────────────────────────────────╮
│ --variable <str> Variable name │
│ --neighbor-lookup <none|pad|backfill|nearest> Enable nearest neighbor (inexact) lookups. │
│ Read Xarray manual on │
│ nearest-neighbor-lookups │
│ --tolerance <float> Maximum distance between original & new │
│ labels for inexact matches. Read Xarray │
│ manual on nearest-neighbor-lookups │
│ [default: 0.1] │
│ --mask-and-scale --no-mask-and-scale Mask and scale the series │
│ [default: no-mask-and-scale] │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
â•─ Plotting ───────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --lines --no-lines Symbol for plotting data points with uniplot [default: lines] │
│ --title <str> Title for the Uniplot │
│ --unit <str> Unit for the Uniplot [default: Unit] │
│ --terminal-width-fraction <float> Fraction of number of columns of the current terminal, ex. 0.9 │
│ [default: 0.9] │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
â•─ > Input : < Output ─────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --verbose -v <int> Show details while executing commands [default: 0] │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
â•─ Metadata ───────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --fingerprint,--fp Fingerprint the output time series │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯