View source: R/sn_street_named_after_id.R
sn_write_street_named_after_id | R Documentation |
Writes wikidata id for given street name
sn_write_street_named_after_id(
gisco_id = NULL,
street_name = NULL,
country = NULL,
named_after_id = NULL,
person = NULL,
gender = NULL,
category = NULL,
tag = NULL,
checked = NULL,
ignore = NULL,
named_after_n = NULL,
named_after_custom_label = NULL,
session = stringi::stri_rand_strings(n = 1, length = 24),
time = Sys.time(),
overwrite = FALSE,
append = TRUE,
connection = NULL,
language = tidywikidatar::tw_get_language(),
disconnect_db = TRUE,
return_df_only = FALSE,
df_to_write = NULL
)
gisco_id |
Identifier of a municipality, typically a gisco identifier. Can be any code, as long as it used consistently, and it starts with a two-letter country code. |
country |
Defaults to NULL. A character string, expected to be a two-letter country code. If not given, tentatively extracted from 'gisco_id'. |
named_after_n |
An integer, defaults to NULL, but most commonly expected to be 1. Input more than one if the street is named after 'n' entities. |
named_after_custom_label |
A character vector, defaults to NULL. To be used only when Wikidata identififer is not available, but it is possible to offer a "cleaner" version of the person/entity a street is dedicated to. |
overwrite |
Logical, defaults to FALSE. If TRUE, it first deletes all rows associated with the item(s) included in 'item_df'. Useful if the original Wikidata object has been updated. |
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 to cache open. |
return_df_only |
Logical, defaults to FALSE. If TRUE, does not write to database but simply returns the data frame that would be written to database when set to TRUE. |
df |
A data frame with two columns: gisco_id and name. |
Nothing, used for its side effects.
sn_set_data_folder(path = tempdir())
sn_write_street_named_after_id(
gisco_id = "IT_022205",
country = "IT",
street_name = "Belvedere San Francesco",
person = TRUE,
named_after_id = "Q676555",
gender = "male",
category = "religion",
tag = "",
checked = TRUE,
session = "testing",
append = TRUE,
overwrite = FALSE,
disconnect_db = 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.