Skip to main content
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 example shows how the step can be used in a recipe.

Examples

  • Example 1
  • Signature
Since the step has no configuration parameters, it’s simply
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 & Outputs

The following are the inputs expected by the step and the outputs it produces. These are generally columns (ds.first_name), datasets (ds or ds[["first_name", "last_name"]]) or models (referenced by name e.g. "churn-clf").
lat
column[number]
required
A numeric column containing latitude coordinates of the places of interest.
lon
column[number]
required
A numeric column containing longitude coordinates of the places of interest.
Dem_Extranjeros_pct
column[number]
required
A numeric column containing the percentage of immigrants registered in the area.
Dem_Casados_pct
column[number]
required
A numeric column containing the percentage of married people in the area.
Dem_Edad
column[number]
required
A numeric column containing the average age in the area.
Dem_Nivel_Estudios
column[number]
required
A numeric column containing the average level of education.
Dem_Vivienda_m2
column[number]
required
A numeric column containing the average size of households in square meters.
Dem_Personas_Hogar
column[number]
required
A numeric column containing the average number of household members.
Dem_Location_Idx
column[number]
required
A numeric column containing an index in the range 1-9 summarizing the overall quality of the location; lower values being better.

Configuration

The following parameters can be used to configure the behaviour of the step by including them in a json object as the last “input” to the step, i.e. step(..., {"param": "value", ...}) -> (output).

Parameters

This step doesn’t expect any configuration.
I