Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivargr committed Sep 20, 2024
2 parents ef880c0 + 43464b6 commit 5b69ed3
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 2 deletions.
34 changes: 34 additions & 0 deletions docs_source/tutorials/downloaded_json_data.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Running on JSON data downloaded from the CHAP-app
=================================================

Convert the JSON data into a CHAP-DataSet
------------------------------------------

After downloading the JSON data from the CHAP-app, it's practical to first convert the data into a CHAP-DataSet. This
fetches the climate data from DHIS2 and harmonizes the data into a single DataSet. This is done by running the following
command:

```bash
chap-cli convert <path-to-json-file> <path-to-output-file>
```

Evaluate models on the dataset
------------------------------
The next step is to evaluate existing models on the dataset, to see if some of them perform well on your dataset.
This is done by running the following command:

```bash
chap-cli evaluate <path-to-dataset-file> <path-to-report-file>.pdf --model-path <model-name>
```

This will generate a report with the evaluation results for the specified model. The default model path is:

Predict using the best model
----------------------------

After evaluating the models, you can predict the values for the dataset using the best model. This is done by running the
predict command:

```bash
```
1 change: 1 addition & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ python-dotenv
myst_parser
furo
virtualenv
pre-commit
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
include_package_data=True,
keywords='climate_health',
name='climate_health',
packages=find_packages(include=['climate_health', 'climate_health.*']),
packages=find_packages(include=['climate_health', 'climate_health.*', 'climate_health.*.*']),
test_suite='tests',
tests_require=test_requirements,
url='https://github.com/sandvelab/climate_health',
Expand Down
5 changes: 4 additions & 1 deletion tests/test_gridded_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@

from climate_health.google_earth_engine.gee_raw import load_credentials


@pytest.fixture
def credentials():
try:
load_credentials()
except Exception as e:
pytest.skip("Credentials not found")


@pytest.fixture
def polygons_filename(data_path):
return data_path/'philippines_polygons.json'
return data_path / 'philippines_polygons.json'


@pytest.mark.skip("Not implemented")
def test_get_gridded_data(polygons_filename):
Expand Down

0 comments on commit 5b69ed3

Please sign in to comment.