Skip to content

Commit

Permalink
setup instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
andresfchamorro committed Oct 8, 2024
1 parent 171c52f commit 60334a8
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 2 deletions.
38 changes: 38 additions & 0 deletions notebooks/agriculture/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,41 @@ Using NASA remote sensing data, analyze changing trends in plantings. For each y
Using NASA remote sensing data, prepare historical drought analysis for Niger and bordering countries. Estimate hectares of farmland where drought has occurred over the past 5 years.

Combine the past 5 years of planting, drought, and conflict statistics to determine to what extent droughts and conflict may have impacted plantings.

## Setup

```bash
conda create -n niger python=3.10
conda activate niger
pip install ipykernel
python -m ipykernel install --user --n niger
cd Repos # or any directory to save repositories
git clone https://github.com/andresfchamorro/phenolopy.git
cd phenolopy
git checkout -b dev
git pull origin dev
cd ..
pip install earthengine-api
python -m pip install git+https://github.com/worldbank/GEE_Zonal.git
pip install geemap
pip install xarray
pip install geojson
pip install tqdm
pip install dask[distributed]
pip install plotnine
pip install rasterstats
```

## Notebooks

- **evi-reference.ipynb**: Extracts vegetation index for static crop areas, defines a baseline, and examines how the current season relate to the baseline.

- **evi-timesat**: Seasonality analysis of EVI data.

- **evi-classification.ipynb**: Random forest classifier to predict active crops based on seasonality parameters, based on example from https://learn.geo4.dev/Satellite%20Crop%20Mapping.html.

- **evi-conflict.ipynb**: Overlay conflict data and EVI.

- **crop-area-zs**: Zonal statistics of crop areas.

- **drought.ipynb**: Drought analysis.
4 changes: 2 additions & 2 deletions reports/agriculture/report.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2192,7 +2192,7 @@
"**Accuracy of the Model**: 0.809 \n",
"**R-Squared**: 0.227 \n",
"\n",
"See more details in [notebook](evi-classification.ipynb)."
"See more details in [evi-classification notebook](../notebooks/evi-classification.ipynb)."
]
},
{
Expand Down Expand Up @@ -2235,7 +2235,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.10"
"version": "3.11.5"
},
"metadata": {
"mystnb": {
Expand Down

0 comments on commit 60334a8

Please sign in to comment.