Browse Source

load a shapefile (no chathams)

Petra Lamborn 3 years ago
parent
commit
f772de2907
1 changed files with 19 additions and 0 deletions
  1. 19
    0
      viz/app.R

+ 19
- 0
viz/app.R View File

@@ -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)