Getting started
Disclaimer (sandboxed version)
This CAMARA Sandbox - Population Density Data - Orange lab API is a sandboxed version of the production-grade CAMARA - Population Density Datas API.
It is running in our lab, against a small geographic area and for a pre-defined time zone (see sandbox limitations part).
This API could be suspended or upgraded any time without any notice.
Introduction
The CAMARA Population Density Data provides population density estimations for a specific area at the current or a future period of time. The estimation considers historical anonymized information of the network connected devices in the requested area.
Sandbox limitations
The sandbox implementation retrieves population density data only from November 25th,2024 00:00:00 to December 1st,2024 23:59:59. (if other date is used an error message
400 POPULATION_DENSITY_DATA.MAX_STARTDATE_EXCEEDED
is send back).A maximum of 1000 data chunks is retrieved for one API Call (by chunk we mean a 30 minutes estimation on a geohash zone).
The geographic zone covered in this sandbox is limited to Paris south region. The area covered is defined with these coordinates: [ 2.262561058545379, 48.853086160821121 ], [ 2.299842493677631, 48.846837337235776 ], [ 2.329737984113872, 48.834105839780584 ], [ 2.343103026897132, 48.816739491369169 ], [ 2.349433836636571, 48.785001423745229 ], [ 2.336420505505502, 48.757185155837021 ], [ 2.30933870828679, 48.738864367083615 ], [ 2.275574389676448, 48.729121481276024 ], [ 2.230907009848183, 48.737008724876162 ], [ 2.198549537846604, 48.755098314502874 ], [ 2.164785219236263, 48.776194606198075 ], [ 2.162674949323116, 48.798672104746849 ], [ 2.184832783411153, 48.829243868846959 ], [ 2.262561058545379, 48.853086160821121 ]
in graphical view:
Documentation of the API
Subscribe to the API
You get the Authorization header credentials when you register your application on the Orange Developer Console.
API Authentication
HTTPS requests to the REST API are protected with 2-Legged OAuth. To learn more about how Orange Developer handles authentication, please refer to our documentation.
In short, you will use your Orange Developer Authorization header as authorization_header for the Basic authentication with Orange Developer.
curl -X POST \
-H "Authorization: {{ authorization_header }}" \
-d "grant_type=client_credentials" \
https://api.orange.com/oauth/v3/token
In response, you will get an access_token
.
{
"token_type": "Bearer",
"access_token": "66AeYJF8eJQ...2SjkFg9LB1LePC",
"expires_in": "3600"
}
API Description
Summary of resources
This API has one resource retrieve. In the response, the Population Density Data are provided by period of time (split of 30 minutes) and by geohash.
A geohash is a system for encoding geographic coordinates (latitude and longitude) into a compact string of letters and digits. It divides the world into a grid and represents each cell in the grid with a unique alphanumeric code. The precision of a geohash increases with its length; longer geohashes correspond to smaller geographic areas. In this implementation we use precision of 7 meaning that the length of the geohash will be 7 characters.
Summary of methods and URL
Use case of operation | URL method |
---|---|
I want to retrieve population density estimation for a given time zone and a given area | POST "https://api.orange.com/camara/orange-lab/population-density-data/v0.1/retrieve" |
Population Density Request Description
Summary of request body parameters
Attribute Name | Description & comment |
---|---|
area | See below |
startDate | Start date time. It must follow RFC 3339 and must have time zone. Recommended format is yyyy-MM-dd'T'HH:mm:ss.SSSZ (i.e. which allows 2023-07-03T14:27:08.312+02:00 or 2023-07-03T12:27:08.312Z) |
endDate | End date time. It must follow RFC 3339 and must have time zone. Recommended format is yyyy-MM-dd'T'HH:mm:ss.SSSZ (i.e. which allows 2023-07-03T14:27:08.312+02:00 or 2023-07-03T12:27:08.312Z) |
precision | Precision required of response cells. Precision defines a geohash level and corresponds to the length of the geohash for each cell. Precision level 7 is used. |
sink | The address to which events about the population density request shall be delivered, using the HTTP protocol. Not managed |
sinkcredential | A sink credential provides authentication or authorization information necessary to enable delivery of events to a target. Not managed |
Note: data type & cardinality are available in the API reference
For the area
, we expect in the request a polygon. Following information must be provided:
areaType
valued to POLYGON (mandatory)- a point list with a minimum of 3, maximum of 15, featuring a
latitude
and alongitude
Exemple of body request
{
"area": {
"areaType": "POLYGON",
"boundary": [
{
"latitude": 45.754114,
"longitude": 4.860374
},
{
"latitude": 45.753845,
"longitude": 4.863185
},
{
"latitude": 45.75249,
"longitude": 4.861876
}
]
},
"startDate": "2024-12-01T22:00:00.000Z",
"endDate": "2024-12-01T23:39:59.000Z",
"precision": 7
}
Population Density Response Description
The response from the Population Density Data API contains population density values represented in time intervals for different cells of the requested area. Each element in the timedPopulationDensityData
array corresponds to a time interval, containing population density data for the grid cells.
Response Attributes
Attribute Name | Description |
---|---|
timedPopulationDensityData | An array of time ranges along with the population density data for the cells within it. The request startDate or endDate must be fully covered by the intervals. |
status | Represents the state of the response for the input polygon defined in the request. Possible values include: SUPPORTED_AREA , PART_OF_AREA_NOT_SUPPORTED , AREA_NOT_SUPPORTED . |
startTime | The interval start time, following RFC 3339 and must have a time zone. Recommended format is yyyy-MM-dd'T'HH:mm:ss.SSSZ . |
endTime | The interval end time, also following RFC 3339 and must have a time zone. Recommended format is yyyy-MM-dd'T'HH:mm:ss.SSSZ . |
cellPopulationDensityData | An array containing population density data for the different cells in a specific time range. |
geohash | Coordinates of the cell represented as a string using the Geohash system. The value length, and thus, the cell granularity, is determined by the request body property precision (7 in our case) |
populationDensityData | An object that contains the estimated population density and an estimation range in a cell for a specific time interval. |
dataType | Indicates the type of data returned, which can be NO_DATA , LOW_DENSITY , or DENSITY_ESTIMATION . |
maxPplDensity | Maximum people/km² estimated for the defined area. |
minPplDensity | Minimum people/km² estimated for the defined area. |
pplDensity | The estimated population density in people/km² for the defined area. |
Notes
- The response may include multiple intervals depending on the requested time range.
Example
Looking for support ?
Facing technical issue when using this API ? please contact us
History of document
Version of the document | modification date | description of modifications |
---|---|---|
1.0 | 22/10/2024 | initialization by Orange CAMARA APIs team |