This function is called by the resp_download module and merges response data from a spreadsheet with boundary data into an sf object

resp_download(
  df,
  area_column,
  resp_column,
  country_code,
  admin_level,
  logger = NULL
)

Arguments

df

dataframe. Containing the response data and the name of the administrative area

area_column

character. The column name of the dataframe containing the administrative areas

resp_column

character. The column name of the dataframe containing the response data

country_code

character. ISO3 code of the country.

admin_level

character. The administrative level requested e.g. ADM1 or ADM2

logger

Stores all notification messages to be displayed in the Log Window. Insert the logger reactive list here for running in shiny, otherwise leave the default NULL

Value

an sf object

Author

Simon Smart simon.smart@cantab.net

Examples

df <- data.frame("area" = c("Triesen", "Schellenberg", "Gamprin", "Triesenberg",
                            "Eschen", "Ruggell", "Mauren", "Schaan", "Balzers",
                             "Planken","Vaduz"), "response" = 1:11)
shape <- resp_download(df, "area", "response", "LIE", "ADM1")