Skip to content

Latest commit

 

History

History
190 lines (126 loc) · 3.86 KB

input.rst

File metadata and controls

190 lines (126 loc) · 3.86 KB

Input data

Every input data set has a corresponding Python module to adjust the unprocessed data provided directly by the upstream data source to the common iTEM structure.

These modules are not invoked directly, but through the function ~historical.process, e.g.

# Process upstream data for data set T009; return the results
process(9)

~historical.process loads and makes use of dataset-specific configuration, checks, and additional code from the corresponding submodule, while automating common cleaning steps. See:

  • the function documentation for a complete description of these steps.
  • the green [source] link next to each function (e.g. .T001.process) to access and inspect the source code for the dataset-specific cleaning steps.

This pattern reduces duplicated code in each dataset-specific submodule, while remaining flexible to upstream data formats.

HOWTO add upstream data sources or sets

  • Add the data set entry to sources.yaml.
  • Copy, rename, and modify an existing module, e.g. T012.py.
  • Extend the tests to ensure this data set is tested.
  • Update the docstrings in the code and this documentation.

Common code

item.historical

item.historical

item.historical.REGION

item.historical.SOURCES

T000

item.historical.T000

item.historical.T000

../../item/data/historical/sources.yaml

T001

item.historical.T001

item.historical.T001

../../item/data/historical/sources.yaml

T002

item.historical.T002

item.historical.T002

../../item/data/historical/sources.yaml

T003

item.historical.T003

item.historical.T003

../../item/data/historical/sources.yaml

T004

item.historical.T004

item.historical.T004

../../item/data/historical/sources.yaml

T005

item.historical.T005

item.historical.T005

../../item/data/historical/sources.yaml

T006

item.historical.T006

item.historical.T006

../../item/data/historical/sources.yaml

T007

item.historical.T007

item.historical.T007

../../item/data/historical/sources.yaml

T008

item.historical.T008

item.historical.T008

../../item/data/historical/sources.yaml

T009

item.historical.T009

item.historical.T009

../../item/data/historical/sources.yaml

T010

item.historical.T010

item.historical.T010

../../item/data/historical/sources.yaml

T012

item.historical.T012

item.historical.T012

../../item/data/historical/sources.yaml