-
Notifications
You must be signed in to change notification settings - Fork 633
/
Copy pathres-mn.R
29 lines (23 loc) · 879 Bytes
/
res-mn.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
library(sf)
f <- tempfile(fileext = ".zip")
download.file("https://www.dot.state.mn.us/maps/gdma/data/datafiles/statewide/indian_res.zip", f)
unzip(f, exdir = dirname(f))
res <- st_read(file.path(dirname(f), "reservtn.shp"))
# assuming this based on epsg provided from other shapefiles on
# https://www.dot.state.mn.us/maps/gdma/gis-data.html
st_crs(res) <- 26915
res_mn <- st_transform(res, 4326)
# plot_mapbox(res_mn, text = ~INDRESNAME, hoverinfo = "text")
devtools::use_data(res_mn, overwrite = TRUE)
# f <- tempfile(fileext = ".zip")
# download.file("https://www.dot.state.mn.us/maps/gdma/data/datafiles/statewide/county.zip", f)
# unzip(f, exdir = dirname(f))
# mn <- st_read(file.path(dirname(f), "MNCounties_MNDOT.shp"))
#
# mn <- mn %>%
# st_simplify(TRUE, 2000) %>%
# st_transform(4326)
#
# # plot_mapbox(mn)
#
# devtools::use_data(mn, overwrite = TRUE)