Skip to contents

update_state() creates a new state of observations in an area. All rows (address) of the BAN are kept. For each address that has also observations both valid and consistent with BAN's version, informations from the most recent observation is added. A summary is added in the column state is also given to easily find if an address has already been observed or not, and if observed if it has protection or not.

Usage

update_state(
  observation,
  ban,
  observation_field = c("ban_id", "date", "visibility", "n_protection", "n_building",
    "n_fence", "coord_sup", "survey_id", "campaign", "survey_state"),
  ban_field = c("id", "address_number", "address_rep", "address_street", "commune",
    "position_type", "locality_name")
)

Arguments

observation

data.frame of observations.

ban

data.frame of address from BAN.

observation_field

character, columns to be kept in observation.

ban_field

character, columns to be kept in ban.

Value

data.frame consistent with ban data.frame (same rows) and with informations from most recent observations.