因此,根据这篇文章,我使用 ggplot 创建了纽约行政区的地图
我有一个看起来像这样的数据集,称为boroughs_personal
borough count
Brooklyn 211
Manhattan 12
Queens 1
Run Code Online (Sandbox Code Playgroud)
因此,我将其加入到地图数据中,与上面的帖子类似,它就像一个梦想。
# download and extract data
bb <- getbb("New York City, New York")
boundaries <- opq(bbox = bb) %>%
add_osm_feature(key = "boundary", value = "administrative") %>%
osmdata_sf() %>%
unname_osmdata_sf()
boroughs <- boundaries[["osm_multipolygons"]] %>%
filter(name %in% c("Manhattan", "The Bronx", "Brooklyn", "Queens", "Staten Island")) %>%
left_join(boroughs_personal , by = c('name' = 'borough'))
ggplot() +
geom_sf(data = boroughs, aes(fill = count))+
##guides(fill=FALSE) +
scale_fill_continuous(low = "lightblue", high = …Run Code Online (Sandbox Code Playgroud) 所以我在雪花中有如下数据:
Question Answer ID
First name? John 001
Last name? Smith 001
First name? Avon 002
Last name? Barksdale 002
First name? Stringer 003
Last name? Bell 003
Run Code Online (Sandbox Code Playgroud)
无论如何,CONCATENATE这些对以下内容有影响吗?
ID Full_Name
001 John Smith
002 Avon Barksdale
003 Stringer Bell
Run Code Online (Sandbox Code Playgroud)