The function adds a new set of locations for downloads and computations to
the database. The location set serves as input for all download and
computation functions.
Usage
add_locations(locations, type, export = TRUE)
Value
Message that the location set has been created successfully. Location data is
written to table data_locations.
Arguments
locations
Locations that should be added as set of locations. Vector of
type character.
type
Name of the location set that should be added. Object of type
character of length 1.
export
Indicator whether the new location set should be directly
exported to the package environment gt.env. Object of type logical,
defaults to TRUE.
Warning
Unfortunately, the Google Trends API cannot handle the location
"NA - Namibia". Therefore, the location will be dropped automatically.
Details
Location sets control the locations for which data is downloaded or to which
computations are applied. By adding new location sets, the default sets
countries and us_states can be expanded by additional sets.
Thereby, users can compute DOI within a region (e.g., adding EU countries as
a set) or single countries (e.g., adding regions of France as a set). Download
and computation functions check whether data for a location already exists.
Therefore, data will not be duplicated when location data already exists from
another set.