Skip to content

his repository contains Python scripts for automating the Data In Emergencies (DIEM) monitoring surveys retrieval. Fore more information, visit https://data-in-emergencies.fao.org/

Notifications You must be signed in to change notification settings

Andrampa/DIEM_API

Repository files navigation

DIEM Aggregated Data Export from API

Overview

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.


Prerequisites

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.


Features

  • 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.

Prerequisites

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

Installation

  1. 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/

How to run the notebook

  1. Ensure that you have a working python environment and the arcgis api for python installed.
  2. Open a terminal or command prompt in the cloned repository's directory.
  3. Start jupyter notebook:
    jupyter notebook
  4. Navigate to the notebook DIEM_API/DIEM_API_get_aggregated_survey_data.ipynb
  5. Update the USERNAME and PASS variables in the notebook with your diem credentials.
  6. Open a terminal or command prompt in the cloned repository's directory.
  7. Run the notebook cells sequentially to execute the code and download or export the data.

Assistance and technical support

If you experience any issues accessing DIEM data or with your DIEM account, please reach out to the DIEM Hub team for technical support.

About

his repository contains Python scripts for automating the Data In Emergencies (DIEM) monitoring surveys retrieval. Fore more information, visit https://data-in-emergencies.fao.org/

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published