The “Continent” resource sits provides access to the details per continent and can be used as gateway to the country urls.
Use this endpoint to retrieve a complete list of continents.
# retrieve Continent list
>>> url = "https://www.the-datagarden.io/continent/"
>>> headers = {'Content-Type': 'application/json', 'Authorization': 'Bearer <access_token>'}
>>>
>>> response = requests.request("GET", url, headers=headers, payload=payload)
The response contains a list of continents, where each continent entry includes the continent name and a URL linking to its detailed resource.
# response
{
"count": 6,
"next": null,
"previous": null,
"results": [
{
"name": "Africa",
"un_country_code": "903",
"url": "http://www.the-datagarden.io/continent/africa/"
},
{
"name": "Asia",
"un_country_code": "935",
"url": "http://www.the-datagarden.io/continent/asia/"
},
{
"name": "Europe",
"un_country_code": "908",
"url": "http://www.the-datagarden.io/continent/europe/"
},
{
"name": "Latin America and the Caribbean",
"un_country_code": "904",
"url": "http://www.the-datagarden.io/continent/latin-america-and-the-caribbean/"
},
{
"name": "Northern America",
"un_country_code": "905",
"url": "http://www.the-datagarden.io/continent/northern-america/"
},
{
"name": "Oceania",
"un_country_code": "909",
"url": "http://www.the-datagarden.io/continent/oceania/"
}
]
}
In the example below the Europe continent resource is retrieved. This can be done with a simple GET request.
# retrieve World resource
>>> url = "https://www.the-datagarden.io/continent/europe"
>>>
>>> headers = {'Content-Type': 'application/json', 'Authorization': 'Bearer <access_token>'}
>>>
>>> response = requests.request("GET", url, headers=headers)
>>> print(response.json())
The response on this request will give you the details of the continent resource.
{
"name": "Europe",
"un_country_code": "908",
"parent_region_name": "World",
"countries": [
"http://www.the-datagarden.io/country/albania/",
"http://www.the-datagarden.io/country/austria/",
"http://www.the-datagarden.io/country/belarus/",
"http://www.the-datagarden.io/country/belgium/",
"http://www.the-datagarden.io/country/bosnia-and-herzegovina/",
"http://www.the-datagarden.io/country/bulgaria/",
"http://www.the-datagarden.io/country/croatia/",
"http://www.the-datagarden.io/country/czechia/",
"http://www.the-datagarden.io/country/denmark/",
"http://www.the-datagarden.io/country/estonia/",
"http://www.the-datagarden.io/country/finland/",
"http://www.the-datagarden.io/country/france/",
"http://www.the-datagarden.io/country/germany/",
"http://www.the-datagarden.io/country/greece/",
"http://www.the-datagarden.io/country/hungary/",
"http://www.the-datagarden.io/country/iceland/",
"http://www.the-datagarden.io/country/ireland/",
"http://www.the-datagarden.io/country/italy/",
"http://www.the-datagarden.io/country/latvia/",
"http://www.the-datagarden.io/country/lithuania/",
"http://www.the-datagarden.io/country/luxembourg/",
"http://www.the-datagarden.io/country/malta/",
"http://www.the-datagarden.io/country/montenegro/",
"http://www.the-datagarden.io/country/netherlands/",
"http://www.the-datagarden.io/country/north-macedonia/",
"http://www.the-datagarden.io/country/norway/",
"http://www.the-datagarden.io/country/poland/",
"http://www.the-datagarden.io/country/portugal/",
"http://www.the-datagarden.io/country/republic-of-moldova/",
"http://www.the-datagarden.io/country/romania/",
"http://www.the-datagarden.io/country/russian-federation/",
"http://www.the-datagarden.io/country/serbia/",
"http://www.the-datagarden.io/country/slovakia/",
"http://www.the-datagarden.io/country/slovenia/",
"http://www.the-datagarden.io/country/spain/",
"http://www.the-datagarden.io/country/sweden/",
"http://www.the-datagarden.io/country/switzerland/",
"http://www.the-datagarden.io/country/ukraine/",
"http://www.the-datagarden.io/country/united-kingdom/"
]
}
When retrieving regional data for continental countries, this endpoint provides detailed information about data availability across the continent and its regions. The response includes:
>>> # Make a GET request to retrieve continental data including statistics
>>> url = "https://www.the-datagarden.io/continent/europe/?include_statistics=y"
>>> headers = {
... 'Content-Type': 'application/json',
... 'Authorization': 'Bearer <access_token>'
... }
>>> response = requests.request("GET", url, headers=headers)
>>> print(response.json())
The response contains three main sections:
# response including statistics data
{
"name": "Europe",
"un_country_code": "908",
"parent_region_name": "World",
"countries": [
"http://www.the-datagarden.io/country/albania/",
"http://www.the-datagarden.io/country/austria/",
... [other countries for brevity purposes]
"http://www.the-datagarden.io/country/belarus/",
"http://www.the-datagarden.io/country/united-kingdom/"
],
"continent_statistics": {
"continent_hierarchy": {
"continent": {
"count": 1,
"region_level": 0,
"with_geojson": 0
},
"country": {
"count": 39,
"region_level": 1,
"with_geojson": 37
}
},
"available_data_on_continent_level": {
"Economics": {
"count": 19,
"sources": [
"UNCTAD"
],
"to_period": "2023-01-01T00:00:00Z",
"from_period": "2005-01-01T00:00:00Z",
"period_type": [
"Y"
]
},
"Demographics": {
"count": 74,
"sources": [
"United Nations"
],
"to_period": "2023-01-01T00:00:00Z",
"from_period": "1950-01-01T00:00:00Z",
"period_type": [
"Y"
]
}
},
"available_data_on_country_level": {
"available_data_for_region_level": {
"Economics": {
"count": 2754,
"sources": [
"UNCTAD"
],
"to_period": "2023-01-01T00:00:00Z",
"from_period": "1970-01-01T00:00:00Z",
"period_type": [
"Y"
]
},
"Demographics": {
"count": 4144,
"sources": [
"United Nations"
],
"to_period": "2023-01-01T00:00:00Z",
"from_period": "1950-01-01T00:00:00Z",
"period_type": [
"Y"
]
},
"region_type": "country",
"region_count": 39
}
}
}
}
Key Response Elements:
For detailed information about specific data models and their contents, please refer to the DataGarden Data Documentation section.