Query observations
GET /v2/observation
Fetch statistical observations for variables over entities.
Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”An arrow notation expression Ex: country/USA<-containedInPlace{typeOf: State}
Supported operators for the formula expression: +, -, *, /, along with parentheses. The items of the formula have a form of “StatVar[OptionalFilters]”.
The following filters are supported:
- mm: MeasurementMethod
- op: ObservationPeriod
- ut: Unit
- sf: ScalingFactor
For example:
- Person_Count - Person_Count_Female
- Person_Count_Female / Person_Count[mm=CensusACS5yrSurvey;op=P5Y]
- Person_Count - Person_Count_Female - Person_Count_Male[op=P5Y]
- (Person_Count_Male - Person_Count_Female) / Person_Count
An arrow notation expression Ex: country/USA<-containedInPlace{typeOf: State}
Supported operators for the formula expression: +, -, *, /, along with parentheses. The items of the formula have a form of “StatVar[OptionalFilters]”.
The following filters are supported:
- mm: MeasurementMethod
- op: ObservationPeriod
- ut: Unit
- sf: ScalingFactor
For example:
- Person_Count - Person_Count_Female
- Person_Count_Female / Person_Count[mm=CensusACS5yrSurvey;op=P5Y]
- Person_Count - Person_Count_Female - Person_Count_Male[op=P5Y]
- (Person_Count_Male - Person_Count_Female) / Person_Count
Date of the observation
- Not specified: all observations are returned
- “LATEST”: latest obseration of each facet is returned
- "
": a speficied valid ISO 8601 date. Observation corresponding to this date is returned.
Value of the observation
When specified, only observations with provenance in these domains are returned.
When specified, only observations with any of these facet ids are returned
Fields to return, valid values are: “variable”, “entity”, “date”, “value”, “facet”
Responses
Section titled “ Responses ”A successful response.
object
object
Holds all observations of a particular variable.
object
object
object
Facet are orderred by preference.
object
object
Facet contains the source and measurement information for a statistical observation.
object
Hash of the metadata, this is to be used together with a map from the hash to the full metatdata. This is set in /stat/set/within-place/* APIs.
Same as meta_hash, used in V1 API.
The types of place that the entity is defined as if it is a geographic place This is an experimental field used for usage logging and is not guaranteed to be populated. The absence of values is not a reliable indicator of whether the associated entity is a place.
object
Facet contains the source and measurement information for a statistical observation.
object
default
Section titled “default ”An unexpected error response.