openforis-whisp 2.0.0a3__tar.gz → 2.0.0a4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {openforis_whisp-2.0.0a3 → openforis_whisp-2.0.0a4}/PKG-INFO +25 -29
- {openforis_whisp-2.0.0a3 → openforis_whisp-2.0.0a4}/README.md +24 -28
- {openforis_whisp-2.0.0a3 → openforis_whisp-2.0.0a4}/pyproject.toml +1 -1
- {openforis_whisp-2.0.0a3 → openforis_whisp-2.0.0a4}/src/openforis_whisp/datasets.py +1 -14
- {openforis_whisp-2.0.0a3 → openforis_whisp-2.0.0a4}/src/openforis_whisp/parameters/lookup_gee_datasets.csv +1 -2
- {openforis_whisp-2.0.0a3 → openforis_whisp-2.0.0a4}/LICENSE +0 -0
- {openforis_whisp-2.0.0a3 → openforis_whisp-2.0.0a4}/src/openforis_whisp/__init__.py +0 -0
- {openforis_whisp-2.0.0a3 → openforis_whisp-2.0.0a4}/src/openforis_whisp/data_conversion.py +0 -0
- {openforis_whisp-2.0.0a3 → openforis_whisp-2.0.0a4}/src/openforis_whisp/logger.py +0 -0
- {openforis_whisp-2.0.0a3 → openforis_whisp-2.0.0a4}/src/openforis_whisp/parameters/__init__.py +0 -0
- {openforis_whisp-2.0.0a3 → openforis_whisp-2.0.0a4}/src/openforis_whisp/parameters/config_runtime.py +0 -0
- {openforis_whisp-2.0.0a3 → openforis_whisp-2.0.0a4}/src/openforis_whisp/parameters/lookup_context_and_metadata.csv +0 -0
- {openforis_whisp-2.0.0a3 → openforis_whisp-2.0.0a4}/src/openforis_whisp/pd_schemas.py +0 -0
- {openforis_whisp-2.0.0a3 → openforis_whisp-2.0.0a4}/src/openforis_whisp/reformat.py +0 -0
- {openforis_whisp-2.0.0a3 → openforis_whisp-2.0.0a4}/src/openforis_whisp/risk.py +0 -0
- {openforis_whisp-2.0.0a3 → openforis_whisp-2.0.0a4}/src/openforis_whisp/stats.py +0 -0
- {openforis_whisp-2.0.0a3 → openforis_whisp-2.0.0a4}/src/openforis_whisp/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: openforis-whisp
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.0a4
|
|
4
4
|
Summary: Whisp (What is in that plot) is an open-source solution which helps to produce relevant forest monitoring information and support compliance with deforestation-related regulations.
|
|
5
5
|
License: MIT
|
|
6
6
|
Keywords: whisp,geospatial,data-processing
|
|
@@ -59,7 +59,6 @@ Description-Content-Type: text/markdown
|
|
|
59
59
|
- [Whisp pathways](#whisp_pathways)
|
|
60
60
|
- [Whisp datasets](#whisp_datasets)
|
|
61
61
|
- [Whisp notebooks](#whisp_notebooks)
|
|
62
|
-
- [System setup](#whisp_setup)
|
|
63
62
|
- [Add data layers](#whisp_add_data)
|
|
64
63
|
- [Contribute to the code](#whisp_contribute)
|
|
65
64
|
- [Code of conduct](#whisp_conduct)
|
|
@@ -176,7 +175,7 @@ The **relevant risk assessment column depends on the commodity** in question:
|
|
|
176
175
|
10) Were there commodity plantations or other agricultural uses in 2023?
|
|
177
176
|
11) Were there logging concessions?
|
|
178
177
|
|
|
179
|
-
# Run Whisp python package from a notebook
|
|
178
|
+
# Run Whisp python package from a notebook <a name="whisp_notebooks"></a>
|
|
180
179
|
|
|
181
180
|
For most users we suggest using the Whisp App to process their plot data. But for some, using the python package directly will fit their workflow.
|
|
182
181
|
|
|
@@ -190,6 +189,7 @@ The **relevant risk assessment column depends on the commodity** in question:
|
|
|
190
189
|
|
|
191
190
|
More info on Whisp can be found in [here](https://openknowledge.fao.org/items/e9284dc7-4b19-4f9c-b3e1-e6c142585865)
|
|
192
191
|
|
|
192
|
+
|
|
193
193
|
## Python package installation
|
|
194
194
|
|
|
195
195
|
The Whisp package is available on pip
|
|
@@ -202,15 +202,15 @@ The **relevant risk assessment column depends on the commodity** in question:
|
|
|
202
202
|
pip install --pre openforis-whisp
|
|
203
203
|
```
|
|
204
204
|
|
|
205
|
-
If running locally we recommend a [virtual environment](https://docs.python.org/3/library/venv.html) to keep your main python installation clean.
|
|
205
|
+
If running the package locally we recommend a [virtual environment](https://docs.python.org/3/library/venv.html) to keep your main python installation clean. For users running the package in Sepal see [here](https://docs.sepal.io/en/latest/cli/python.html#virtual-environment).
|
|
206
206
|
|
|
207
207
|
The package relies upon the google earth engine api being setup correctly using a registered cloud project.
|
|
208
208
|
|
|
209
|
-
More info on Whisp can be found
|
|
209
|
+
More info on Whisp can be found [here](https://openknowledge.fao.org/items/e9284dc7-4b19-4f9c-b3e1-e6c142585865)
|
|
210
210
|
|
|
211
211
|
|
|
212
212
|
|
|
213
|
-
## How to add data layers to Whisp
|
|
213
|
+
## How to add data layers to Whisp <a name="whisp_add_data"></a>
|
|
214
214
|
|
|
215
215
|
|
|
216
216
|
|
|
@@ -253,12 +253,24 @@ Before submitting a request, consider the following:
|
|
|
253
253
|
### Adding your own data directly
|
|
254
254
|
|
|
255
255
|
|
|
256
|
-
|
|
257
256
|
To add your own data you will need some coding experience as well as familiarity with GitHub and Google Earth Engine.
|
|
258
257
|
|
|
258
|
+
This approach is for those who want to run a bespoke analysis combining their own data with those already in Whisp.
|
|
259
|
+
|
|
260
|
+
Firstly follow the steps below to install the package in editable mode.
|
|
259
261
|
|
|
260
|
-
|
|
262
|
+
As with the regular pip installation, we recommend a separate [virtual environment](https://docs.python.org/3/library/venv.html) for running in editable mode. For Sepal users see [here](https://docs.sepal.io/en/latest/cli/python.html#virtual-environment).
|
|
261
263
|
|
|
264
|
+
```bash
|
|
265
|
+
|
|
266
|
+
git clone https://github.com/forestdatapartnership/whisp.git
|
|
267
|
+
|
|
268
|
+
cd whisp/
|
|
269
|
+
|
|
270
|
+
pip install -e .[dev]
|
|
271
|
+
|
|
272
|
+
```
|
|
273
|
+
Once in editable mode you are running the Whisp package locally based on a cloned version of the code.
|
|
262
274
|
|
|
263
275
|
|
|
264
276
|
|
|
@@ -294,7 +306,7 @@ For example, if it is a dataset for tree cover in 2000, then add `'treecover'` u
|
|
|
294
306
|
|
|
295
307
|
```python
|
|
296
308
|
|
|
297
|
-
def
|
|
309
|
+
def my_custom_dataset_prep():
|
|
298
310
|
|
|
299
311
|
image = ee.Image("MY/GEE/DATASET")
|
|
300
312
|
|
|
@@ -309,7 +321,6 @@ return binary.rename("My_custom_dataset")
|
|
|
309
321
|
---
|
|
310
322
|
|
|
311
323
|
|
|
312
|
-
|
|
313
324
|
We are working on ways to make this process smoother. However, in the meantime do contact us through the [issues page on GitHub](https://github.com/forestdatapartnership/whisp/issues), or via the Open Foris email, if this functionality is useful to you or you need help.
|
|
314
325
|
|
|
315
326
|
|
|
@@ -318,28 +329,14 @@ We are working on ways to make this process smoother. However, in the meantime d
|
|
|
318
329
|
|
|
319
330
|
|
|
320
331
|
|
|
321
|
-
## Contributing to the Whisp code base
|
|
322
|
-
|
|
332
|
+
## Contributing to the Whisp code base <a name="whisp_contribute"></a>
|
|
323
333
|
|
|
334
|
+
Contributions to the Whisp code in GitHub are welcome. These could be additional functionality, datasets or just cleaner code! Contributions can be made by forking the repository, making and pushing the required changes, then making a pull request to the Whisp repository. After briefly reviewing the request, we can make a branch for which to make a new pull request to. After final checks, we can then incorporate the code into the main branch. If in doubt, get in contact first or log as an issue [here](https://github.com/forestdatapartnership/whisp/issues/).
|
|
324
335
|
|
|
325
|
-
Contributions to the Whisp code in GitHub are welcome. They can be made by forking the repository, making and pushing the required changes, then making a pull request to the Whisp repository. After briefly reviewing the request, we can make a branch for which to make a new pull request to. After final checks, we can then incorporate the code into the main branch. If in doubt, get in contact first or log as an issue [here](https://github.com/forestdatapartnership/whisp/issues/).
|
|
326
336
|
|
|
337
|
+
Install the package in editable mode (see Adding your own data directly above):
|
|
327
338
|
|
|
328
|
-
|
|
329
|
-
Install the package in editable mode:
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
```bash
|
|
333
|
-
|
|
334
|
-
git clone https://github.com/forestdatapartnership/whisp.git
|
|
335
|
-
|
|
336
|
-
cd whisp/
|
|
337
|
-
|
|
338
|
-
pip install -e .[dev]
|
|
339
|
-
|
|
340
|
-
```
|
|
341
|
-
|
|
342
|
-
Add additional dependencies required for testing and running pre-commit hooks:
|
|
339
|
+
Then add additional dependencies required for testing and running pre-commit hooks:
|
|
343
340
|
|
|
344
341
|
|
|
345
342
|
```bash
|
|
@@ -352,7 +349,6 @@ pre-commit install
|
|
|
352
349
|
You should be able to run the Pytest suite by simply running the `pytest` command from the repo's root folder.
|
|
353
350
|
|
|
354
351
|
|
|
355
|
-
|
|
356
352
|
Please read the [contributing guidelines](contributing_guidelines.md) for good practice recommendations
|
|
357
353
|
|
|
358
354
|
|
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
- [Whisp pathways](#whisp_pathways)
|
|
23
23
|
- [Whisp datasets](#whisp_datasets)
|
|
24
24
|
- [Whisp notebooks](#whisp_notebooks)
|
|
25
|
-
- [System setup](#whisp_setup)
|
|
26
25
|
- [Add data layers](#whisp_add_data)
|
|
27
26
|
- [Contribute to the code](#whisp_contribute)
|
|
28
27
|
- [Code of conduct](#whisp_conduct)
|
|
@@ -139,7 +138,7 @@ The **relevant risk assessment column depends on the commodity** in question:
|
|
|
139
138
|
10) Were there commodity plantations or other agricultural uses in 2023?
|
|
140
139
|
11) Were there logging concessions?
|
|
141
140
|
|
|
142
|
-
# Run Whisp python package from a notebook
|
|
141
|
+
# Run Whisp python package from a notebook <a name="whisp_notebooks"></a>
|
|
143
142
|
|
|
144
143
|
For most users we suggest using the Whisp App to process their plot data. But for some, using the python package directly will fit their workflow.
|
|
145
144
|
|
|
@@ -153,6 +152,7 @@ The **relevant risk assessment column depends on the commodity** in question:
|
|
|
153
152
|
|
|
154
153
|
More info on Whisp can be found in [here](https://openknowledge.fao.org/items/e9284dc7-4b19-4f9c-b3e1-e6c142585865)
|
|
155
154
|
|
|
155
|
+
|
|
156
156
|
## Python package installation
|
|
157
157
|
|
|
158
158
|
The Whisp package is available on pip
|
|
@@ -165,15 +165,15 @@ The **relevant risk assessment column depends on the commodity** in question:
|
|
|
165
165
|
pip install --pre openforis-whisp
|
|
166
166
|
```
|
|
167
167
|
|
|
168
|
-
If running locally we recommend a [virtual environment](https://docs.python.org/3/library/venv.html) to keep your main python installation clean.
|
|
168
|
+
If running the package locally we recommend a [virtual environment](https://docs.python.org/3/library/venv.html) to keep your main python installation clean. For users running the package in Sepal see [here](https://docs.sepal.io/en/latest/cli/python.html#virtual-environment).
|
|
169
169
|
|
|
170
170
|
The package relies upon the google earth engine api being setup correctly using a registered cloud project.
|
|
171
171
|
|
|
172
|
-
More info on Whisp can be found
|
|
172
|
+
More info on Whisp can be found [here](https://openknowledge.fao.org/items/e9284dc7-4b19-4f9c-b3e1-e6c142585865)
|
|
173
173
|
|
|
174
174
|
|
|
175
175
|
|
|
176
|
-
## How to add data layers to Whisp
|
|
176
|
+
## How to add data layers to Whisp <a name="whisp_add_data"></a>
|
|
177
177
|
|
|
178
178
|
|
|
179
179
|
|
|
@@ -216,12 +216,24 @@ Before submitting a request, consider the following:
|
|
|
216
216
|
### Adding your own data directly
|
|
217
217
|
|
|
218
218
|
|
|
219
|
-
|
|
220
219
|
To add your own data you will need some coding experience as well as familiarity with GitHub and Google Earth Engine.
|
|
221
220
|
|
|
221
|
+
This approach is for those who want to run a bespoke analysis combining their own data with those already in Whisp.
|
|
222
|
+
|
|
223
|
+
Firstly follow the steps below to install the package in editable mode.
|
|
222
224
|
|
|
223
|
-
|
|
225
|
+
As with the regular pip installation, we recommend a separate [virtual environment](https://docs.python.org/3/library/venv.html) for running in editable mode. For Sepal users see [here](https://docs.sepal.io/en/latest/cli/python.html#virtual-environment).
|
|
224
226
|
|
|
227
|
+
```bash
|
|
228
|
+
|
|
229
|
+
git clone https://github.com/forestdatapartnership/whisp.git
|
|
230
|
+
|
|
231
|
+
cd whisp/
|
|
232
|
+
|
|
233
|
+
pip install -e .[dev]
|
|
234
|
+
|
|
235
|
+
```
|
|
236
|
+
Once in editable mode you are running the Whisp package locally based on a cloned version of the code.
|
|
225
237
|
|
|
226
238
|
|
|
227
239
|
|
|
@@ -257,7 +269,7 @@ For example, if it is a dataset for tree cover in 2000, then add `'treecover'` u
|
|
|
257
269
|
|
|
258
270
|
```python
|
|
259
271
|
|
|
260
|
-
def
|
|
272
|
+
def my_custom_dataset_prep():
|
|
261
273
|
|
|
262
274
|
image = ee.Image("MY/GEE/DATASET")
|
|
263
275
|
|
|
@@ -272,7 +284,6 @@ return binary.rename("My_custom_dataset")
|
|
|
272
284
|
---
|
|
273
285
|
|
|
274
286
|
|
|
275
|
-
|
|
276
287
|
We are working on ways to make this process smoother. However, in the meantime do contact us through the [issues page on GitHub](https://github.com/forestdatapartnership/whisp/issues), or via the Open Foris email, if this functionality is useful to you or you need help.
|
|
277
288
|
|
|
278
289
|
|
|
@@ -281,28 +292,14 @@ We are working on ways to make this process smoother. However, in the meantime d
|
|
|
281
292
|
|
|
282
293
|
|
|
283
294
|
|
|
284
|
-
## Contributing to the Whisp code base
|
|
285
|
-
|
|
295
|
+
## Contributing to the Whisp code base <a name="whisp_contribute"></a>
|
|
286
296
|
|
|
297
|
+
Contributions to the Whisp code in GitHub are welcome. These could be additional functionality, datasets or just cleaner code! Contributions can be made by forking the repository, making and pushing the required changes, then making a pull request to the Whisp repository. After briefly reviewing the request, we can make a branch for which to make a new pull request to. After final checks, we can then incorporate the code into the main branch. If in doubt, get in contact first or log as an issue [here](https://github.com/forestdatapartnership/whisp/issues/).
|
|
287
298
|
|
|
288
|
-
Contributions to the Whisp code in GitHub are welcome. They can be made by forking the repository, making and pushing the required changes, then making a pull request to the Whisp repository. After briefly reviewing the request, we can make a branch for which to make a new pull request to. After final checks, we can then incorporate the code into the main branch. If in doubt, get in contact first or log as an issue [here](https://github.com/forestdatapartnership/whisp/issues/).
|
|
289
299
|
|
|
300
|
+
Install the package in editable mode (see Adding your own data directly above):
|
|
290
301
|
|
|
291
|
-
|
|
292
|
-
Install the package in editable mode:
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
```bash
|
|
296
|
-
|
|
297
|
-
git clone https://github.com/forestdatapartnership/whisp.git
|
|
298
|
-
|
|
299
|
-
cd whisp/
|
|
300
|
-
|
|
301
|
-
pip install -e .[dev]
|
|
302
|
-
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
Add additional dependencies required for testing and running pre-commit hooks:
|
|
302
|
+
Then add additional dependencies required for testing and running pre-commit hooks:
|
|
306
303
|
|
|
307
304
|
|
|
308
305
|
```bash
|
|
@@ -315,7 +312,6 @@ pre-commit install
|
|
|
315
312
|
You should be able to run the Pytest suite by simply running the `pytest` command from the repo's root folder.
|
|
316
313
|
|
|
317
314
|
|
|
318
|
-
|
|
319
315
|
Please read the [contributing guidelines](contributing_guidelines.md) for good practice recommendations
|
|
320
316
|
|
|
321
317
|
|
|
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
|
|
|
4
4
|
|
|
5
5
|
[tool.poetry]
|
|
6
6
|
name = "openforis-whisp"
|
|
7
|
-
version = "2.0.
|
|
7
|
+
version = "2.0.0a4"
|
|
8
8
|
description = "Whisp (What is in that plot) is an open-source solution which helps to produce relevant forest monitoring information and support compliance with deforestation-related regulations."
|
|
9
9
|
repository = "https://github.com/forestdatapartnership/whisp"
|
|
10
10
|
authors = ["Andy Arnell <and.arnell@fao.org>"]
|
|
@@ -58,19 +58,6 @@ def g_jrc_gfc_2020_prep():
|
|
|
58
58
|
return jrc_gfc2020_raw.mosaic().rename("EUFO_2020")
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
## removing JAXA product due to repeat errors of commission being noted by users, compared to other datasets
|
|
62
|
-
|
|
63
|
-
# # JAXA_FNF_2020
|
|
64
|
-
# def g_jaxa_forest_prep():
|
|
65
|
-
# jaxa_forest_non_forest_raw = ee.ImageCollection("JAXA/ALOS/PALSAR/YEARLY/FNF4")
|
|
66
|
-
# jaxa_forest_non_forest_2020 = (
|
|
67
|
-
# jaxa_forest_non_forest_raw.filterDate("2020-01-01", "2020-12-31")
|
|
68
|
-
# .select("fnf")
|
|
69
|
-
# .mosaic()
|
|
70
|
-
# )
|
|
71
|
-
# return jaxa_forest_non_forest_2020.lte(2).rename("JAXA_FNF_2020")
|
|
72
|
-
|
|
73
|
-
|
|
74
61
|
# GFC_TC_2020
|
|
75
62
|
def g_glad_gfc_10pc_prep():
|
|
76
63
|
gfc = ee.Image("UMD/hansen/global_forest_change_2024_v1_12")
|
|
@@ -285,7 +272,7 @@ def g_fdap_rubber_2023_prep():
|
|
|
285
272
|
fdap_rubber = (
|
|
286
273
|
fdap_rubber2020_model_raw.filterDate("2023-01-01", "2023-12-31")
|
|
287
274
|
.mosaic()
|
|
288
|
-
.gt(0.
|
|
275
|
+
.gt(0.59) # Threshold for Rubber
|
|
289
276
|
)
|
|
290
277
|
return fdap_rubber.rename("Rubber_2023_FDaP")
|
|
291
278
|
|
|
@@ -2,7 +2,6 @@ name,order,ISO2_code,theme,theme_timber,use_for_risk,use_for_risk_timber,exclude
|
|
|
2
2
|
EUFO_2020,10,,treecover,naturally_reg_2020,1,1,0,float32,1,0,g_jrc_gfc_2020_prep
|
|
3
3
|
GLAD_Primary,20,,treecover,primary,1,1,0,float32,1,0,g_glad_pht_prep
|
|
4
4
|
TMF_undist,30,,treecover,primary,1,1,0,float32,1,0,g_jrc_tmf_undisturbed_prep
|
|
5
|
-
JAXA_FNF_2020,40,,treecover,NA,1,0,1,float32,1,0,g_jaxa_forest_prep
|
|
6
5
|
GFC_TC_2020,50,,treecover,naturally_reg_2020,1,1,0,float32,1,0,g_glad_gfc_10pc_prep
|
|
7
6
|
Forest_FDaP,60,,treecover,naturally_reg_2020,1,1,0,float32,1,0,g_glad_gfc_10pc_prep
|
|
8
7
|
ESA_TC_2020,70,,treecover,naturally_reg_2020,1,1,0,float32,1,0,g_esa_worldcover_trees_prep
|
|
@@ -173,7 +172,7 @@ ESRI_2023_crop,2130,,NA,agri_after_2020,0,1,0,float32,1,0,g_esri_2023_crop_prep
|
|
|
173
172
|
GLC_FCS30D_crop_2022,2140,,NA,agri_after_2020,0,1,0,float32,1,0,g_glc_fcs30d_crop_2022_prep
|
|
174
173
|
GFW_logging_before_2020,2200,,NA,logging_concession,0,1,0,float32,1,0,g_logging_concessions_prep
|
|
175
174
|
nCO_ideam_forest_2020,2310,CO,treecover,NA,1,1,0,float32,1,0,nco_ideam_forest_2020_prep
|
|
176
|
-
nCO_ideam_eufo_commission_2020,2320,CO,commodities,NA,
|
|
175
|
+
nCO_ideam_eufo_commission_2020,2320,CO,commodities,NA,1,1,0,float32,1,0,nco_ideam_eufo_commission_2020_prep
|
|
177
176
|
nBR_INPE_TC_primary_forest_Amazon_2020,2400,BR,treecover,primary,1,1,0,float32,1,0,nbr_terraclass_amz20_primary_prep
|
|
178
177
|
nBR_INPE_TC_secondary_forest_Amazon_2020,2401,BR,treecover,naturally_reg_2020,1,1,0,float32,1,0,nbr_terraclass_amz20_secondary_prep
|
|
179
178
|
nBR_BFS_primary_forest_Pantanal_2020,2402,BR,treecover,primary,1,1,0,float32,1,0,nbr_bfs_ptn_f20_prep
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openforis_whisp-2.0.0a3 → openforis_whisp-2.0.0a4}/src/openforis_whisp/parameters/__init__.py
RENAMED
|
File without changes
|
{openforis_whisp-2.0.0a3 → openforis_whisp-2.0.0a4}/src/openforis_whisp/parameters/config_runtime.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|