Function used to downlaod Geolocalized SIRENE data-base.

download.geo_sirene(
  destination,
  origin = "cquest",
  name = NULL,
  extension = NULL,
  version = NULL,
  date = NULL,
  month = NULL,
  version_insee = "v2019",
  verbose = TRUE
)

Arguments

destination

character, the address where dara are stocked.

origin

character, either a keyword or the address from where data are downloaded. Best to keep it at default value. See details.

name

character, vector of acceptable names fo archive to be downloaded.

extension

character, vector of acceptable types of archive to be downloaded.

version

string, version of ADMIN EXPRESS to be downloaded.

date

character, date of the archive to be downloaded.

month

character, vector of month to be downloaded

version_insee

string, INSEE version to be downloaded. Only used with origin = "cquest".

verbose

logical, should the function send some messages while running.

Value

nothing

Details

If origin == "cquest", then all necessary variables are filled with those values:

  • origin is changed to https://data.cquest.org/geo_sirene. This url is adapted depending on version_insee.

  • version_insee If value is "v2019", then the version 2019 is dowloaded from https://data.cquest.org/geo_sirene.

  • name If version is not set to null, then default value is changed to "StockEtablissement_utf8", which should be the most complete version at France level.

  • extension default value is changed to "csv.gz".

  • month is used to set something equivalent to date, but directly in origin.

  • date is set to null, because conflict may occur with month.

If not, everything shall be filled so that download_archive() can make a successful download.

@export

Examples

if (FALSE) {
origin = "https://data.cquest.org/geo_sirene"
destination = tempdir()
month = c("2018-11", "2019-05", "2020-03")
download.geo_sirene(origin, destination, month = month)
unlink(destination)
}