View source: R/sn_get_street_named_after_id.R
| sn_get_street_named_after_id | R Documentation |
Retrieve combination of municipality/street name/wikidata id and category from database.
sn_get_street_named_after_id(
country = NULL,
gisco_id = NULL,
street_name = NULL,
streets_sf = NULL,
lau_year = 2020,
keep_only_latest = TRUE,
only_checked = FALSE,
remove_ignored = TRUE,
only_ignored = FALSE,
include_checked_elsewhere_in_country = FALSE,
language = tidywikidatar::tw_get_language(),
connection = NULL,
disconnect_db = TRUE
)
country |
A two letter country code. See 'unique(sn_lau_by_nuts$country)' for available values. |
gisco_id |
A characther vector of length one, must correpond to a gisco id. See 'sn_lau_by_nuts' for available values. |
street_name |
A characther vector of length one, a street name. If not given, returns added data on all streets for given municipality. |
include_checked_elsewhere_in_country |
Defaults to FALSE. If TRUE, retrieves all streets from the whole country, keeps the most recent, and includes it in the final output if no local match is found or the national match is more recent. |
language |
Defaults to language set with 'tw_set_language()'; if not set, "en". Use "all_available" to keep all languages. For available language values, see https://www.wikidata.org/wiki/Help:Wikimedia_language_codes/lists/all |
connection |
Defaults to NULL. If NULL, and caching is enabled, 'streetnamer' will use a local sqlite database. A custom connection to other databases can be given (see vignette 'caching' for details). |
disconnect_db |
Defaults to TRUE. If FALSE, leaves the connection open. |
If data present in database, returns a data frame with relevant data stored in the database.
sn_set_data_folder(path = tempdir())
sn_write_street_named_after_id(
gisco_id = "IT_022205",
street_name = "Belvedere San Francesco",
named_after_id = "Q676555",
country = "IT",
person = TRUE,
category = NA,
session = as.character(floor(runif(1) * 1e20)),
time = Sys.time(),
checked = TRUE
)
sn_get_street_named_after_id(
gisco_id = "IT_022205",
street_name = "Belvedere San Francesco",
country = "IT"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.