openforis-whisp 2.0.0a3__py3-none-any.whl → 2.0.0a4__py3-none-any.whl

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.
@@ -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.93) # Threshold for Rubber
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,0,1,0,float32,1,0,nco_ideam_eufo_commission_2020_prep
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: openforis-whisp
3
- Version: 2.0.0a3
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 in [here](https://openknowledge.fao.org/items/e9284dc7-4b19-4f9c-b3e1-e6c142585865)
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
- Firstly follow the steps to install the package in editable mode (as detailed below in Contributing to the Whisp code base). Once in editable mode you are running the Whisp package locally based on a cloned version of the code. This approach is for those who want to run a bespoke analysis combining their own data with those already in Whisp. If, however, you think the datasets are of use to the wider community and you have the code running smoothly, you can make a pull request from a forked repository.
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 nBR_my_custom_dataset_prep():
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
 
@@ -1,17 +1,17 @@
1
1
  openforis_whisp/__init__.py,sha256=xfXNzskPfnlQkmf3QZHEydhte3U9_uLdoYM04eowNqw,2403
2
2
  openforis_whisp/data_conversion.py,sha256=Ean2SBxhGr1YwzhbrHQD9kDdRYdNTJZLBiAmYZtBIM8,11812
3
- openforis_whisp/datasets.py,sha256=EOiNwTaMUMc0hYXBwUVzP-5q0Vq2jqzdNQF0Y6GQCSQ,52411
3
+ openforis_whisp/datasets.py,sha256=IXKvUe0R06Ha0K7ITYlRoOwSTEvE08qmRfx64HpbtX4,51915
4
4
  openforis_whisp/logger.py,sha256=n9k0EhAZYZKesnfskv8KyWnkGbjqRqk84ulx9-u_Jsc,2308
5
5
  openforis_whisp/parameters/__init__.py,sha256=KL7iORJVjSpZatYjoyWckcmQJnE89_DBC8R6_0_eR6o,349
6
6
  openforis_whisp/parameters/config_runtime.py,sha256=aH00CFV09f7JQnZQzpCFR5BIlvsovVfM4K_KUjMl0N8,1416
7
7
  openforis_whisp/parameters/lookup_context_and_metadata.csv,sha256=54uZ4oqfsiHgj2I39pAcsCr4SeSUqgIRboDhlxIAdik,1293
8
- openforis_whisp/parameters/lookup_gee_datasets.csv,sha256=r1s_eUneFOVk7RALukaJj7Rj374XWuZTDkE2dAZAeu0,17691
8
+ openforis_whisp/parameters/lookup_gee_datasets.csv,sha256=3YRG-ZvMAeekGTSvrDMyDnioOZUvy_iMbEaZcLhVPw0,17622
9
9
  openforis_whisp/pd_schemas.py,sha256=W_ocS773LHfc05dJqvWRa-bRdX0wKFoNp0lMxgFx94Y,2681
10
10
  openforis_whisp/reformat.py,sha256=o3TpeuddR1UlP1C3uFeI957kIZYMQqEW1pXsjKbAtiY,17922
11
11
  openforis_whisp/risk.py,sha256=E9yZJ2wCinYrOydKK7EB0O5Imk5quG9Cs1uNkcv8AlM,31531
12
12
  openforis_whisp/stats.py,sha256=yAa6j3RpkPIjAM06IKQ7XGaFrwXhxfzIXn37aTOEwP4,33562
13
13
  openforis_whisp/utils.py,sha256=hpeY9aA3BND2m9c15PZ6_nClemsfiVNUEzA4pQXfztA,5330
14
- openforis_whisp-2.0.0a3.dist-info/LICENSE,sha256=nqyqICO95iw_iwzP1t_IIAf7ZX3DPbL_M9WyQfh2q1k,1085
15
- openforis_whisp-2.0.0a3.dist-info/METADATA,sha256=yjXgVT5Max81548KdmoHRCe1SDap2o1cKkVUYiUUA3Q,16933
16
- openforis_whisp-2.0.0a3.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
17
- openforis_whisp-2.0.0a3.dist-info/RECORD,,
14
+ openforis_whisp-2.0.0a4.dist-info/LICENSE,sha256=nqyqICO95iw_iwzP1t_IIAf7ZX3DPbL_M9WyQfh2q1k,1085
15
+ openforis_whisp-2.0.0a4.dist-info/METADATA,sha256=Xd8wihc9vGDwt5CLXtVTWy2urFSeWFGY_D2MlhCL8-c,17278
16
+ openforis_whisp-2.0.0a4.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
17
+ openforis_whisp-2.0.0a4.dist-info/RECORD,,