API#
Top-level API#
|
Inverted selector value. |
|
Structured description of a processing step done on a timeseries. |
Structured description of all processing steps done on a timeseries. |
|
xarray extension accessors providing an API under the 'pr' namespace. |
|
|
Open and decode a dataset from a file or file-like object. |
Unit registry class. |
Submodules#
primap2.pm2io#
Data reading module of the PRIMAP2 climate policy analysis package.
|
Convert a DataFrame in long (tidy) format into the PRIMAP2 interchange format. |
|
Convert a DataFrame in wide format into the PRIMAP2 interchange format. |
|
Convert dataset from the interchange format to the standard PRIMAP2 format. |
|
Add unit information to a National Inventory Report (NIR) style DataFrame. |
|
Convert an entity-wide NIR table for a single year to a long format DataFrame. |
|
Read a dataset in the interchange format from disk into memory. |
|
Read a CSV file in long (tidy) format into the PRIMAP2 interchange format. |
|
Read a CSV file in wide format into the PRIMAP2 interchange format. |
|
Write dataset in interchange format to disk. |
primap2.csg#
Composite Source Generator
Generate a composite harmonized dataset from multiple sources according to defined source priorities and matching algorithms.
|
Fill missing data by global least square matching. |
|
Defines source priorities for composing a full dataset or a single timeseries. |
|
Defines filling strategies for a single timeseries. |
|
The filling strategy is unable to process the given timeseries, possibly due to missing data. |
Fill missing data in the result dataset by copying. |
|
|
Compose a harmonized dataset from multiple input datasets. |
DataArray#
Attributes#
Translate a shortened dimension alias to a full dimension name. |
|
The pint conversion context for this DataArray, directly usable for conversions. |
|
Location-based indexing like xr.DataArray.loc with added features. |
Methods#
|
Like da[], but translates short aliases like "area" into the long names including the corresponding category-set. |
|
Manually aggregate data for coordinates |
|
Reduce this DataArray's data by applying |
|
Combine data from multiple arrays. |
|
Convert to a global warming potential |
Convert to a global warming potential in the units of a reference array. |
|
|
Convert a global warming potential of a greenhouse gas to a mass. |
|
Reduce this array by counting along some dimension(s). |
|
Summarize how many data points exist for a dimension combination. |
Removes units from the DataArray and its coordinates. |
|
|
Downscale timeseries along a dimension using a basket defined on a broader timeseries. |
|
Fill NA values only where all values along the specified dimension(s) are NA. |
|
Fill missing information from other array. |
|
Merge with da_merge with a tolerance for discrepancies in values found in both. |
|
Attaches units to the DataArray. |
|
Set values, optionally expanding the given dimension as necessary. |
|
Reduce this DataArray's data by applying |
|
Convert this array into an unstacked (i.e. non-tidy) pandas.DataFrame. |
Dataset#
Attributes#
Longer form description |
|
Who can answer questions about the data |
|
Translate a shortened dimension alias to a full dimension name. |
|
The terminology of the entity attributes in this dataset's data variables |
|
Where the data originates |
|
Location-based indexing like xr.DataArray.loc with added features. |
|
The original date of publication of the dataset, if published. |
|
Citable reference(s) describing the data |
|
License or other usage restrictions of the data |
|
A succinct description |
Methods#
|
Like ds[], but translates short aliases like "area" into the long names including the corresponding category-set. |
|
Manually aggregate data for coordinates |
|
Creates or fills gas baskets |
|
Reduce this Dataset's data by applying |
|
Combine with data from other dataset or array. |
|
Reduce this Dataset by counting along some dimension(s). |
|
Summarize how many data points exist for a dimension combination. |
Removes units from the Dataset and its coordinates. |
|
Downscale a gas basket defined on a broader timeseries to its contents known on fewer time points. |
|
|
Downscale timeseries along a dimension using a basket defined on a broader timeseries. |
Ensure this is a valid primap2 data set. |
|
|
Add a dimension and coordinate to dataset. |
|
Fill NA values only where all values along the specified dimension(s) are NA. |
Fill NA values in a gas basket using the sum of its contents. |
|
|
Fill missing information from other dataset. |
|
The sum of gas basket contents converted using the global warming potential of the gas basket. |
True if the dataset has processing information for at least one entity. |
|
|
Merge two Datasets with a tolerance for discrepancies in values present in both Datasets. |
|
Attaches units to each variable in the Dataset. |
Return dataset with all variables with processing information removed. |
|
|
Set values, optionally expanding the given dimension as necessary. |
|
Reduce this Dataset's data by applying |
|
Convert this dataset into a pandas.DataFrame. |
|
Convert dataset to the interchange format. |
|
Write dataset contents to a netCDF file. |