The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Dissemination and Capacity Strengthening » Application Programming Interface (API)  » Problem opening geojsons using API
Problem opening geojsons using API [message #30672] Fri, 17 January 2025 10:42 Go to next message
oliver-fiala is currently offline  oliver-fiala
Messages: 4
Registered: June 2024
Member
I am familiarising myself at the moment with the possibility to call spatial boundary files for selected DHS surveys using the API (as described here: https://api.dhsprogram.com/#/api-geometry.cfm).

While this works fabulously for some surveys (eg, the suggested example http://api.dhsprogram.com/rest/dhs/geometry/SN2010DHS works well, both with QGIS as well as with geospatial tools in Stata), many other surveyIds or country codes (eg, BD2014DHS or BD or EG) produce errors with any programme, suggesting there are issues with the geojson. I was wondering if this is a known problem or if I am missing anything?
Re: Problem opening geojsons using API [message #30674 is a reply to message #30672] Fri, 17 January 2025 11:28 Go to previous messageGo to next message
admin is currently offline  admin
Messages: 53
Registered: November 2012
Senior Member
Administrator
Thank You Oliver, we are aware that there are some issues with the Geometry in the API. In the meantime, we suggest that you use the Spatial Data Repository to acquire the boundaries or the boundaries joined with survey data: https://spatialdata.dhsprogram.com/home/


We now have repositories of code written in Stata and SPSS available on Github. Please reference these code repositories as a resource for code for matching or calculating DHS indicators. The code repositories can be found at:

https://github.com/DHSProgram/DHS-Indicators-Stata
https://github.com/DHSProgram/DHS-Indicators-SPSS

Re: Problem opening geojsons using API [message #30675 is a reply to message #30674] Fri, 17 January 2025 11:37 Go to previous message
oliver-fiala is currently offline  oliver-fiala
Messages: 4
Registered: June 2024
Member
Thank you very much for your swift reply, that's good to know.

Do you mind posting an update here, once this has been addressed?

Many thanks!
Oliver
Previous Topic: API query relocated
Goto Forum:
  


Current Time: Thu Jan 23 17:20:03 Coordinated Universal Time 2025