Skip to content

Fetch demographics es

social · census · 3rd party API · integration

Fetch Spanish demographic census data given a geographical location in each row.

Using geographical coordinates provided by latitude and longitude columns, enriches the input dataset with a subset of the 2011 Spanish census. See below for the seven features to be added by the step.

Usage


The following are the step's expected inputs and outputs and their specific types.

Step signature
fetch_demographics_es(
    lat: number,
    lon: number
) -> (
    Dem_Extranjeros_pct: number,
    Dem_Casados_pct: number,
    Dem_Edad: number,
    Dem_Nivel_Estudios: number,
    Dem_Vivienda_m2: number,
    Dem_Personas_Hogar: number,
    Dem_Location_Idx: number
)

where the object {"param": value} is optional in most cases and if present may contain any of the parameters described in the corresponding section below.

Example

Since the step has no configuration parameters, it's simply

Example call (in recipe editor)
fetch_demographics_es(ds.lat, ds.lon) -> (
  ds.Dem_Extranjeros_pct,
  ds.Dem_Casados_pct,
  ds.Dem_Edad,
  ds.Dem_Nivel_Estudios,
  ds.Dem_Vivienda_m2,
  ds.Dem_Personas_Hogar,
  ds.Dem_Location_Idx
)

Inputs


lat: column:number

A numeric column containing latitude coordinates of the places of interest.


lon: column:number

A numeric column containing longitude coordinates of the places of interest.

Outputs


Dem_Extranjeros_pct: column:number

A numeric column containing the percentage of immigrants registered in the area.


Dem_Casados_pct: column:number

A numeric column containing the percentage of married people in the area.


Dem_Edad: column:number

A numeric column containing the average age in the area.


Dem_Nivel_Estudios: column:number

A numeric column containing the average level of education.


Dem_Vivienda_m2: column:number

A numeric column containing the average size of households in square meters.


Dem_Personas_Hogar: column:number

A numeric column containing the average number of household members.


Dem_Location_Idx: column:number

A numeric column containing an index in the range 1-9 summarizing the overall quality of the location; lower values being better.

Back to top