This project automates the download and export of aggregated data from the DIEM Monitoring System using the ArcGIS API for Python. It supports filtering based on specific conditions and exporting data in formats like CSV and File Geodatabase.
To programmatically download data from the DIEM Monitoring System, you must first create a DIEM account. After creating your account, please allow a few minutes for the necessary privileges to be assigned before you can access the DIEM API.
Install ArcGIS API for Python This project requires the ArcGIS API for Python, which is freely available.
You can Install the library using pip install arcgis
.
For more details, Refer to the ArcGIS API for Python Documentation
Download Field descriptions and metadata To understand the structure and content of the DIEM datasets, download the field description tables, metadata, and survey-specific questionnaires from the DIEM data access page, after logging in with your DIEM credentials. These resources provide necessary information about the available fields and their purposes. Make sure to refer to these descriptions when working with the data.
- Query and filter aggregated data based on ISO3 country codes and DIEM survey rounds.
- Export filtered data to various formats, including CSV, File Geodatabase, and others.
- Exclude unnecessary fields like geometry during export.
- Easy-to-configure user parameters.
First create a DIEM account, if you don't have one yet. Ensure you have the following installed:
- Python 3.6 or newer
- ArcGIS API for Python (
arcgis
) - Jupyter Notebook
- Clone this repository:
git clone https://github.com/Andrampa/DIEM_API.git cd DIEM_API
. For more information, visit https://data-in-emergencies.fao.org/
- Ensure that you have a working python environment and the arcgis api for python installed.
- Open a terminal or command prompt in the cloned repository's directory.
- Start jupyter notebook:
jupyter notebook
- Navigate to the notebook DIEM_API/DIEM_API_get_aggregated_survey_data.ipynb
- Update the
USERNAME
andPASS
variables in the notebook with your diem credentials. - Open a terminal or command prompt in the cloned repository's directory.
- Run the notebook cells sequentially to execute the code and download or export the data.
If you experience any issues accessing DIEM data or with your DIEM account, please reach out to the DIEM Hub team for technical support.