iTEM maintains two databases:
-
A model database of transport energy projections assembled as part of the iTEM Workshops. Because of restrictions from workshop participants, the model database is currently not public, but only available to iTEM workshop participants.
-
A historical database to form a common, public, “best available” baseline for model calibration and projections. The historical database is currently under development.
This repository contains tools for both databases, in both Python and R. The goals for these tools are that:
- iTEM participants use the tools to access either database and perform basic data manipulations such as retrieval, selection, and aggregation, in either Python, R (or possibly, in the future, other languages).
- Members of the iTEM organizing group use the tools to prepare templates for data submission, and to aggregate & clean submitted data.
- iTEM participants, if they choose, maintain code that transparently & reproducibly derives the iTEM variables from immediate output files of their models.
- The tools are well-tested and yield reproducible results.
python/
— Python code for accessing & maintaining the database. Seepython/README.md
.item/data/
— Metadata about the iTEM databases. Actual data is stored separately; see below.model/
— Metadata about the iTEM model database. Many of these files are in YAML format (Wikipedia), with more detailed comments in-line.models.yaml
— description of the iTEM participating models & teams.dimensions/
— information about the data dimensions of the model database.- Other directories:
- are named to match the keys in
models.yaml
, - contain model-specific metadata, including but not limited to:
regions.yaml
: regional aggregation.scenarios.yaml
: descriptions of scenarios submitted to each iTEM workshop.
- are named to match the keys in
concepts.yaml
,measures.yaml
,spec.yaml
— specifications of data to be submitted for for the 3rd iTEM MIP.item_config_example.yaml
— an example configuration file.
R/
— R code for accessing & maintaining the database. SeeR/README.md
.
The following instructions are not language-specific.
Both the Python and R tools will operate on data stored in the following way; see the language README
s for specific information.
-
Clone this repository and/or install the code in one or both languages.
-
Create 1 or more separate directory to contain the input and output files. A simple way to do this is to call
item mkdirs PATH
, wherePATH
is a base directory; this will create a tree of directories. Useitem mkdirs --help
for more information. -
Copy the file
item_config_example.yaml
toitem_config.yaml
in any working directory where you intend to use this code. Edit the file (see the inline comments) to point to the directories created in #2 above. -
Use the tools through the command-line interface:
$ item Usage: item [OPTIONS] COMMAND [ARGS]... Command-line interface for the iTEM databases. Options: --path <KEY> <PATH> Override data paths (multiple allowed). --help Show this message and exit. Commands: debug Show debugging information, including paths. help Show extended help for the command-line tool. mkdirs Create a directory tree for the database. model Manipulate the model database. stats Manipulate the stats database. template Generate the MIP3 submission template.