2017-08-01から1ヶ月間の記事一覧

mapview::mapview()の引数オプション

mapview::mapview()で利用する引数に関するメモ。 library(mapview) library(sf) nc <- read_sf(system.file("shape/nc.shp", package="sf")) mapview(nc, zcol="AREA", # 色分けするデータ(列) #color="blue", # ラインの色 #col.regions="red", # ポリゴ…

sfオブジェクトをggplot()する場合はgeometryカラムの名前に注意

geom_sf()関数を利用するにあたり geometryカラムがgeometryではなくgeomの場合にはエラーが出た。 解決方法のメモ。 library(sf) library(ggplot2) library(spData) data(world) head(world) Simple feature collection with 6 features and 10 fields geom…