小编Joh*_*mas的帖子

在 R 中向地图数据添加标签

因此,根据这篇文章,我使用 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)

label r ggplot2 r-sf

1
推荐指数
1
解决办法
5899
查看次数

如何在 SQL (Snowflake) 中连接不同行中的两个字符串?

所以我在雪花中有如下数据:

   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)

sql concatenation snowflake-cloud-data-platform

0
推荐指数
1
解决办法
30
查看次数