Skip to content

Commit

Permalink
Merge pull request #8 from wateraccounting/new-language
Browse files Browse the repository at this point in the history
update AR and FR notebooks, readme
  • Loading branch information
trngbich authored Apr 9, 2021
2 parents 26b4969 + 4a671bb commit 8f547af
Show file tree
Hide file tree
Showing 20 changed files with 283 additions and 6,178 deletions.
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ Authors: Bich Tran, Abebe Chukalla, Solomon Seyoum
* Get raster and crop raster
* Get custom Water Productivity raster

### Run notebooks
### Set up Python environment

**You must do this the first time you open the Jupyter Notebooks**

**Step 1**: Download repository zipfile and unzip

Expand All @@ -35,21 +37,27 @@ Clone in Git Bash ([Git](https://git-scm.com/) needs to be installed)
>>> git clone https://github.com/wateraccounting/WAPOROCW.git


**Step 2**: Open Anaconda prompt, change directory to folder **..\WAPOROCW\notebooks**
**Step 2**: Open Anaconda prompt, change directory to folder **..\WAPOROCW-master**

>>> cd ..PATH..\WAPOROCW\notebooks
>>> cd ..PATH..\WAPOROCW-master\

**Step 3**: Create a new environment from environment.yml file

>>> conda env create

![](./create_env.PNG)

**Step 4**: Then activate environment with required packages
### Start Jupyter Notebook

**Step 1**: Change directory to folder **..\WAPOROCW-master\notebooks**

>>> cd ..PATH..\WAPOROCW-master\notebooks

**Step 2**: Then activate environment with required packages

>>> conda activate waporocw

**Step 5**: Start jupyter notebook
**Step 3**: Start jupyter notebook

>>> jupyter notebook

Expand Down
64 changes: 64 additions & 0 deletions README_AR.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# دفاتر Jupyter لـ "إنتاجية المياه ومحاسبة المياه باستخدام برنامج WaPOR" التدريبي المفتوح
! [] (http://www.fao.org/typo3temp/pics/93f49ce381.jpg)
## [شاهد الدورة الكاملة على IHE Delft OpenCourseWare] (https://ocw.un-ihe.org/course/view.php؟id=92&section=0)

المؤلفون: بيش تران ، أبيبي شكلا ، سليمان سيوم

<html>
<head>
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"> <img alt = "ترخيص المشاع الإبداعي" style = "border-width: 0" src = "https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" /> </a> <br /> هذا العمل مرخص بموجب <a rel = "License" href = "http://creativecommons.org/licenses/by-nc-sa/4.0/"> المشاع الإبداعي Attribution-NonCommercial-ShareAlike 4.0 International License </a>
</head>
</html>

## محتويات

### الوحدة 1: المقدمة والاستخدام

- الوحدة الرابعة لتحليل البيانات المكانية WaPOR باستخدام حزم Python
* تنزيل بيانات WaPOR النقطية
* مقطع وإعادة أخذ العينات
* حساب النقطية
- الوحدة 5 WaPOR API
* احصل على فهرس وجدول البيانات المتاحة
* احصل على نقطة ومنطقة زمنية متسلسلة
* احصل على خطوط المسح والمحاصيل النقطية
* احصل على بيانات نقطية مخصصة لإنتاجية المياه

### إعداد بيئة Python

** يجب عليك القيام بذلك في المرة الأولى التي تفتح فيها Jupyter Notebooks **

** الخطوة 1 **: قم بتنزيل ملف zipfile الخاص بالمستودع وفك ضغطه

أو

يجب تثبيت Clone in Git Bash ([Git] (https://git-scm.com/))

>>> git clone https://github.com/wateraccounting/WAPOROCW.git


** الخطوة 2 **: افتح موجه Anaconda ، وقم بتغيير الدليل إلى مجلد **..\WAPOROCW-master**

>>> cd ..PATH..\WAPOROCW-master\

** الخطوة 3 **: أنشئ بيئة جديدة من ملف environment.yml

>>> conda env create

! [] (./create_env.PNG)

### بدء Jupyter Notebook

** الخطوة 1 **: تغيير الدليل إلى مجلد **..\WAPOROCW-master\notebooks_AR**

>>> cd ..PATH..\WAPOROCW-master\notebooks_AR

** الخطوة 2 **: ثم تفعيل البيئة بالباقات المطلوبة

>>> conda activate waporocw

** الخطوة 3 **: ابدأ دفتر jupyter

>>> jupyter notebook

![](./activate_env.PNG)
18 changes: 13 additions & 5 deletions README_FR.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ Ouagadougou, Burkina Faso
* Obtenir et découper des rasters
* Obtenir des rasters de productivité de l'eau sur critères personnalisés

### Exécuter des Jupyter notebooks
### Configurer l'environnement Python

**Vous devez le faire la première fois que vous ouvrez les notebooks Jupyter**

**Étape 1**: Téléchargez le fichier zip du référentiel et décompressez

Expand All @@ -43,21 +45,27 @@ Cloner dans Git Bash ([Git](https://git-scm.com/) doit être installé)
>>> git clone https://github.com/wateraccounting/WAPOROCW.git


**Étape 2**: Ouvrez Anaconda Prompt, changez de répertoire pour le dossier **..\WAPOROCW\notebooks_FR**
**Étape 2**: Ouvrez Anaconda Prompt, changez de répertoire pour le dossier **..\WAPOROCW-master**

>>> cd ..PATH..\WAPOROCW\notebooks_FR
>>> cd ..PATH..\WAPOROCW-master

**Étape 3**: Créer un nouvel environnement à partir du fichier environment.yml

>>> conda env create

![](./create_env.PNG)

**Étape 4**: Ensuite, activez l'environnement avec les packages requis
### Exécuter des Jupyter notebooks

**Étape 1**: Changez de répertoire pour le dossier **..\WAPOROCW-master\notebooks_FR**

>>> cd ..PATH..\WAPOROCW\notebooks_FR

**Étape 2**: Ensuite, activez l'environnement avec les packages requis

>>> conda activate waporocw

**Étape 5**: Commencer jupyter notebook
**Étape 3**: Commencer jupyter notebook

>>> jupyter notebook

Expand Down
Binary file modified activate_env.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified create_env.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 1 addition & 5 deletions notebooks/environment.yml → environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,4 @@ dependencies:
- pyshp=2.1.*
- python=3.7
- shapely=1.6.*
- requests==2.24.*
- pip:
- hkvwaporpy==0.7.2


- requests==2.24.*
2 changes: 1 addition & 1 deletion modules/WaPOR/download_daily.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def main(Dir, data='RET', Startdate='2009-01-01', Enddate='2018-12-31',

# Download data
WaPOR.API.version=version
catalog=WaPOR.API.catalog
catalog=WaPOR.API.getCatalog()
bbox=[lonlim[0],latlim[0],lonlim[1],latlim[1]]

if level==1:
Expand Down
2 changes: 1 addition & 1 deletion modules/WaPOR/download_monthly.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def main(Dir, data='AETI',Startdate='2009-01-01', Enddate='2018-12-31',

# Download data
WaPOR.API.version=version
catalog=WaPOR.API.catalog
catalog=WaPOR.API.getCatalog()
bbox=[lonlim[0],latlim[0],lonlim[1],latlim[1]]

if level==1:
Expand Down
2 changes: 1 addition & 1 deletion modules/WaPOR/download_seasonal.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def main(Dir, data='AETI',Startdate='2009-01-01', Enddate='2018-12-31',
# Download data
WaPOR.API.version=version
bbox=[lonlim[0],latlim[0],lonlim[1],latlim[1]]
catalog=WaPOR.API.catalog
catalog=WaPOR.API.getCatalog()

if level==1:
cube_code=f"L1_{data}_S"
Expand Down
2 changes: 1 addition & 1 deletion modules/WaPOR/download_yearly.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def main(Dir, data='AETI',Startdate='2009-01-01', Enddate='2018-12-31',
# Download data
WaPOR.API.version=version
bbox=[lonlim[0],latlim[0],lonlim[1],latlim[1]]
catalog=WaPOR.API.catalog
catalog=WaPOR.API.getCatalog()

if level==1:
cube_code=f"L1_{data}_A"
Expand Down
Loading

0 comments on commit 8f547af

Please sign in to comment.