The Foundational Industry Energy Dataset (FIED) compiles and derives from
multiple data sources in a well defined sequence of steps.
To provide transparency and reproducibility, we organized all the procedures, including obtaining the raw data and the processing steps, in a Python package named fied.
Why the trouble of creating a Python package? We could just share the used scripts. However, our scripts are built on top of other Python packages that change with time. Actually, we evolve as well. For instance, to extend from the 2017 to the 2020 edition we had to adapt to changes in the data sources as well as we improved some steps on our procedures. By providing a formal Package, we can specify the required dependencies and make it easier for anyone to reproduce our results, as well as re-use our resources and extend for other purposes. Also, by tagging the versions of the package, we can keep track of the changes and be able to reproduce the results at any time.
The first step to recreate FIED is to install the fied package as follows.
There are several ways to install a Python package.
We strongly recommend using a virtual environment to avoid conflicts with other packages and projects in your system.
For development we use pixi and our recommended way to install fied.
Some options are:
Assuming that you already have Python installed in your system, you most probably have pip as well.
To confirm that you have Python and PIP installed and learn the versions you have, you can run
python3 --versionand
python3 -m pip --versionWith that, you can use pip to install the fied package directly from our repository, i.e. the latest version.
pip install -U git+https://github.com/NREL/foundational-industry-energy-data.gitNow you can run it on a terminal or use it inside Python. In a terminal, you can run
fiedand in Python import it and re-use as a regular package
import fied
print(fied.__version__)We recommend using pixi to manage a Python environment with fied and all the required dependencies since it can reproduce exactly what we use for development.
Other alternatives are to install fied with pip or conda.
- Install
pixiitself on your system. You only need to do this once, so you can skip this step if you already havepixiinstalled.
Please follow the instructions at pixi.sh to install pixi on your system.
For Linux and MacOS:
curl -fsSL https://pixi.sh/install.sh | shFor Windows:
powershell -ExecutionPolicy ByPass -c "irm -useb https://pixi.sh/install.ps1 | iex"-
Clone FIED repository if you don't already have it.
git clone
-
Pixi provides support to use virtual environment with all the dependencies required to run
fied. To do so, pixi uses the information frompyproject.tomlandpixi.lockfiles, therefore, you need to move to where you cloned the repository. Once there, you can activate your environment by running:pixi shell
You might notice a
(fied)prefix in your terminal, which indicates that you are now in thefiedenvironment. Now you can run the commandfied --versionto verify which version you are using, and runfiedto rebuild the dataset locally.