浏览代码

load a shapefile (no chathams)

Petra Lamborn 3 年前
父节点
当前提交
f772de2907
共有 1 个文件被更改,包括 19 次插入0 次删除
  1. 19
    0
      viz/app.R

+ 19
- 0
viz/app.R 查看文件

@@ -0,0 +1,19 @@
1
+library(shiny)
2
+library(leaflet)
3
+library(rgdal)
4
+
5
+sf <- readOGR(dsn="../shapefiles/sa20025WGSfil")
6
+crs <- leafletCRS(proj4def = sf@proj4string,
7
+                  bounds=sf@bbox)
8
+leaflet(sf) %>% addPolygons()
9
+
10
+# Define UI for application that draws a histogram
11
+ui <- fluidPage(
12
+)
13
+
14
+# Define server logic required to draw a histogram
15
+server <- function(input, output) {
16
+}
17
+
18
+# Run the application 
19
+shinyApp(ui = ui, server = server)