Skip to content

Repository files navigation

Lifetime Exposures and Asthma outcomes Projection (LEAP)

Tests Docs

For a full guide on how to use this package, please see the documentation at https://resplab.github.io/leap/.

Installation

  1. To install this package on your computer locally, first download it from GitHub:
git clone https://github.com/resplab/leap
  1. Next, create a virtual environment:
cd leap
python -m venv env
source env/bin/activate
  1. Finally, install the package using pip and the -e flag, which makes the package editable:
pip install -e .

Running the Simulation

The default simulation configuration options are found in the LEAP/processed_data/config.json file.

To run the LEAP model from the command line, using the default settings:

leap --run-simulation --path-output PATH/TO/OUTPUT/FOLDER

Examples

To run the simulation for 1 year, starting in 2024, with the maximum age of 4, and 10 new borns in the first year:

leap --run-simulation --time-horizon 1 --num-births-initial 10 --max-age 4 --min-year 2024 \
--path-output PATH/TO/OUTPUT/FOLDER

To specify the province and population growth scenario:

leap --run-simulation --time-horizon 1 --num-births-initial 10 --max-age 4 --province "CA" \
--min-year 2024 --projection-scenario "M3" --path-output PATH/TO/OUTPUT/FOLDER

If you would like to use your own config.json file instead of the default one:

leap --run-simulation --config PATH/TO/YOUR/CONFIG.json --path-output PATH/TO/OUTPUT/FOLDER

Developers

Testing

To run all the tests:

cd leap
pytest tests/

To run a single test file:

cd leap
pytest tests/test_name.py

To run doctests:

cd leap
pytest leap/ --doctest-modules

Documentation

GitHub doesn't allow for private pages via GitHub Pages unless you're using GitHub Enterprise. To view the documentation locally instead:

cd leap/docs
make clean
make html

Now go to leap/docs/_build/html/index.html, and open that file in your browser. You should now be able to navigate through the documentation webpages.

About

Python package for the Lifetime Exposures and Asthma outcomes Projection (LEAP) Model

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages