Carto API Changes // June 2020

This API is used to retrieve information and GeoJSON for countries, regions, districts, and subdistricts. It can also be used to split, merge, and reshape districts and subdistricts. When districts are split and merged, this will result in new IDs for those. When a district is reshaped, the GeoJSON is updated for that district but the ID stays the same.

This API will drive the District Management UI on the ESPEN Admin, as well as some maps that are rendered on the ESPEN Portal.

The Cartographies table was populated by parsing the 3 latest shapefiles, listed below. You can find notes on this process here:

Cartographies Import

Shapefiles

Countries (admin0)

https://espenportal.blob.core.windows.net/shapefiles/AFRO_ADM0_201812_shapefiles.zip

https://espenportal.blob.core.windows.net/shapefiles/AFRO_ADM0_201812_geojson.zip

Regions (admin1)

https://espenportal.blob.core.windows.net/shapefiles/AFRO_ADM1_201812_shapefiles.zip

https://espenportal.blob.core.windows.net/shapefiles/AFRO_ADM1_201812_geojson.zip

IUs (admin2 or admin3)

https://espenportal.blob.core.windows.net/shapefiles/AFRO_IUs_201812_shapefiles.zip

https://espenportal.blob.core.windows.net/shapefiles/AFRO_IUs_201812_geojson.zip

GET /api/cartographies

Returns a list of cartographies, including all countries, regions, and IUs (districts and subdistricts). The results can be filtered on various attributes, like admin0, admin1, and admin2. You can search by any of the attributes that are returned by the index (e.g. iso2).

You also have the option to only return records of a certain administrative level. For example, passing a admin_level param with the value "admin0" will only return countries (which are admin level 0).

No GeoJSON is included in the response by default, but you can use the geojson=true flag to enable it.

By default, all attributes are returned. However, you can also provide an attributes parameter in the request, which is a comma-separated list of attributes. This will restrict the response to only those attributes.