dtmapi
is an R package developed by Displacement Tracking Matrix (DTM). This
package allows the humanitarian community, academia, media, government,
and non-governmental organizations to utilize the data collected by DTM.
It provides non-sensitive Internally Displaced Person (IDP) figures,
aggregated at the country, Admin 1 (states, provinces, or equivalent),
and Admin 2 (smaller subnational administrative areas) levels. Country
Name and Operation can be found in this data
coverage matrix.
Please find more information about DTM API here.
The dtmapi
package is available on CRAN and can be
installed using the following command:
install.packages("dtmapi")
After installation, load the package using library():
library(dtmapi)
Here’s a quick example to get you started:
# Get all countries for which DTM data is publicly available through the API.
<- get_all_countries()
countries_df head(countries_df)
# Get all operations for which DTM data is publicly available through the API.
<- get_all_operations()
operations_df head(operations_df)
# Get IDP Admin 0 Data for Ethiopia from Round 1 to Round 10
<- get_idp_admin0_data(CountryName='Ethiopia', FromRoundNumber=1, ToRoundNumber=10)
idp_admin0_df head(idp_admin0_df)
# Get IDP Admin 1 Data for Sudan from reporting date 2020-01-01 to 2024-08-15
<- get_idp_admin1_data(CountryName='Sudan', Admin1Name="Blue Nile", FromReportingDate='2020-01-01', ToReportingDate='2024-08-15')
idp_admin1_df head(idp_admin1_df)
# Get IDP Admin 2 Data for Lebanon
<- get_idp_admin2_data(Operation="Displacement due to conflict", CountryName='Lebanon')
idp_admin2_df head(idp_admin2_df)
Comprehensive documentation is available at github.io.
The source code for dtmapi
is available on GitHub.
Feel free to explore the repository, contribute, or raise any issues you may encounter.
For any questions or feedback, please reach out to us at dtmsupport@iom.int.