Skip to content

Commit

Permalink
Merge pull request #49 from datapartnership/ag-readme
Browse files Browse the repository at this point in the history
setup instructions
  • Loading branch information
andresfchamorro authored Oct 8, 2024
2 parents 171c52f + 22237d0 commit 3729fe2
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 9 deletions.
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/project_setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,4 @@ body:
id: assignment-summary
attributes:
label: Project Assignment
description: Please provide a summary of the project and assignment and, when available, upload work plan shared with client.

description: Please provide a summary of the project and assignment and, when available, upload work plan shared with client.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

## Assignment

The West Africa Prosperity Team has requested support for using alternative data to better understand economic trends in Niger following a coup and civil unrest.
The West Africa Prosperity Team has requested support for using alternative data to better understand economic trends in Niger following a coup and civil unrest.

The assignment covers analysis of crop productivity trends, conflict mapping, monitoring nighttime lights, and understanding population movement trends.
The assignment covers analysis of crop productivity trends, conflict mapping, monitoring nighttime lights, and understanding population movement trends.


## Data
Expand All @@ -17,11 +17,11 @@ The following datasets are used in this assignmet. Further details about each da

* [Digital Earth Africa Cropland Extent Map](https://www.digitalearthafrica.org/platform-resources/services/cropland-extent-map) - The service shows the presence or absence of crop for a 10-meter pixel resolution.

* [MODIS](https://modis.gsfc.nasa.gov/) - NASA's 'Modern Resolution Imaging Spectroradiometer' dataset, used to monitor changes in surface vegetation.
* [MODIS](https://modis.gsfc.nasa.gov/) - NASA's 'Modern Resolution Imaging Spectroradiometer' dataset, used to monitor changes in surface vegetation.

* [Meta Co-Loctiaon Maps](https://dataforgood.facebook.com/dfg/tools/colocation-maps) - Colocation Maps measure the probability that two individuals from two locations are found in the same location at the same time. These maps help researchers analyze the probability that people in areas with disease outbreaks will come in contact with new populations. The data can be requested through the [Development Data Partnership](https://datapartnership.org/).




## Reusable Data Science Products
Expand All @@ -36,7 +36,7 @@ The following data products are included in this project:

* [Co-Location Analytics](https://datapartnership.org/niger-economic-monitoring/notebooks/movement/README.html)




## License
Expand Down
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 3729fe2

Please sign in to comment.