towns | R Documentation |
Select a set of cities; the set can be defined using the id of the country, the fact that it is a capital and the size
towns(x, size = NULL, capital = FALSE, crs = NULL, shift = FALSE)
x |
a |
size |
the minimum size of the cities that have to be
retrieved (the default value is |
capital |
if |
crs |
an optional crs which is passed to |
shift |
a boolean, if |
a sf
containing five columns:
iso2
: the id of the country,
iso3
: the id of the country,
name
: the name of the city,
capital
: a boolean, TRUE
for a capital
pop
: the population of the city,
point
: a point sfc
containing the coordinates of the city
we <- countries("Western Europe")
towns(we, size = 1E06, capital = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.