Contents
See setting up your development environment for general tool installation and configuration.
Unfortunately, geopandas doesn't work properly when installed using uv (or pip) so we use patio with pixi.
brew install pixiNavigate to the cloned patio repository and run the following to setup patio
with pixi. Note: do not clone patio to anywhere managed by OneDrive.
pre-commit install
pixi installIf you have not yet initialized etoolbox on your computer, run this command and follow the instructions:
pixi run etb cloud initThe FRED_API_KEY and BLS_KEY must be set as environment variables.
To set the environment variable FRED_API_KEY with the value abcd1234 (replace
this value with your actual API key), use the following command:
echo 'export FRED_API_KEY=abcd1234' >> ~/.zshenvThe value can be retrieved in R using its key:
FRED_API_KEY <- Sys.getenv("FRED_API_KEY")Additional information on setting up your IDE to use the pixi environment see these guides PyCharm, RStudio.
For the R code to work properly, additional setup is required if you do not have
conda installed. You can test this by running conda in your terminal, if it says
something like command not found: conda, then it needs to be installed.
Install conda with pixi:
pixi global install condaInitialize conda.
~/.pixi/bin/conda init $(basename $SHELL)For RStudio to use the patio environment created in the previous steps, you must open it from the terminal with the following command. The first time running this may take a long time as additional R packages are downloaded and compiled.
pixi run rstudioLaunch the R console.
pixi run RMost git GUI tools work with pre-commit but don't work that well. The terminal based
git is usually the safer choice. See
notes on git for
for recommendations and instructions.
To run the resource model:
pixi run patioTo run the economic model with <model-run-datestr> replaced with the run's
name/identifier:
pixi run patio-econ <model-run-datestr>