library(sf)
## Linking to GEOS 3.8.0, GDAL 3.0.4, PROJ 6.3.1
library(sp)
library(tmap)

shelby <- st_read("Shelby.gdb")
## Multiple layers are present in data source C:\Users\mwtro\OneDrive\Documents\r spatial\data\Shelby.gdb, reading layer `Community_Garden_shelby'.
## Use `st_layers' to list all layer names and their type in a data source.
## Set the `layer' argument in `st_read' to read a particular layer.
## Warning in evalq((function (..., call. = TRUE, immediate. = FALSE, noBreaks. =
## FALSE, : automatically selected the first layer in a data source containing more
## than one.
## Reading layer `Community_Garden_shelby' from data source `C:\Users\mwtro\OneDrive\Documents\r spatial\data\Shelby.gdb' using driver `OpenFileGDB'
## Simple feature collection with 33 features and 17 fields
## geometry type:  POINT
## dimension:      XY
## bbox:           xmin: 756844.4 ymin: 298726.4 xmax: 794158.8 ymax: 341723.2
## projected CRS:  NAD83 / Tennessee (ftUS)
library <- st_read("Shelby.gdb", layer="Library_Shelby")
## Reading layer `Library_Shelby' from data source `C:\Users\mwtro\OneDrive\Documents\r spatial\data\Shelby.gdb' using driver `OpenFileGDB'
## Simple feature collection with 22 features and 16 fields
## geometry type:  POINT
## dimension:      XY
## bbox:           xmin: 752812.9 ymin: 272549.6 xmax: 875503.7 ymax: 390129.8
## projected CRS:  NAD83 / Tennessee (ftUS)
schools <- st_read("Shelby.gdb", layer="School_shelby")
## Reading layer `School_shelby' from data source `C:\Users\mwtro\OneDrive\Documents\r spatial\data\Shelby.gdb' using driver `OpenFileGDB'
## Simple feature collection with 391 features and 17 fields
## geometry type:  POINT
## dimension:      XY
## bbox:           xmin: 734398 ymin: 263306.1 xmax: 876914 ymax: 397840.4
## projected CRS:  NAD83 / Tennessee (ftUS)
roads <- st_read("Shelby.gdb", layer="Roads_shelby")
## Reading layer `Roads_shelby' from data source `C:\Users\mwtro\OneDrive\Documents\r spatial\data\Shelby.gdb' using driver `OpenFileGDB'
## Simple feature collection with 2763 features and 8 fields
## geometry type:  MULTILINESTRING
## dimension:      XY
## bbox:           xmin: -90.12757 ymin: 34.99427 xmax: -89.6358 ymax: 35.40568
## geographic CRS: WGS 84
hospital <- st_read("Shelby.gdb", layer="Hospital_Shelby")
## Reading layer `Hospital_Shelby' from data source `C:\Users\mwtro\OneDrive\Documents\r spatial\data\Shelby.gdb' using driver `OpenFileGDB'
## Simple feature collection with 21 features and 17 fields
## geometry type:  POINT
## dimension:      XY
## bbox:           xmin: 760308.5 ymin: 279451.1 xmax: 856890.3 ymax: 351008.6
## projected CRS:  NAD83 / Tennessee (ftUS)
county <- st_read("Shelby.gdb", layer="County_Shelby")
## Reading layer `County_Shelby' from data source `C:\Users\mwtro\OneDrive\Documents\r spatial\data\Shelby.gdb' using driver `OpenFileGDB'
## Simple feature collection with 1 feature and 23 fields
## geometry type:  MULTIPOLYGON
## dimension:      XY
## bbox:           xmin: 677966.9 ymin: 261279.3 xmax: 885736.8 ymax: 412664.8
## projected CRS:  NAD83 / Tennessee (ftUS)
rail <- st_read("Shelby.gdb", layer="Rail_Shelby") 
## Reading layer `Rail_Shelby' from data source `C:\Users\mwtro\OneDrive\Documents\r spatial\data\Shelby.gdb' using driver `OpenFileGDB'
## Simple feature collection with 339 features and 8 fields
## geometry type:  MULTILINESTRING
## dimension:      XY
## bbox:           xmin: 727063.6 ymin: 263436.6 xmax: 883773.4 ymax: 407636.1
## projected CRS:  NAD83 / Tennessee (ftUS)
tmap_mode("plot") +
tm_shape(county) +
  tm_borders("black", lwd=1) +
  tm_fill("grey90") +
tm_shape(roads) +
  tm_lines("grey50") +
tm_shape(rail) +
  tm_lines("tan") + 
tm_shape(library) +
  tm_bubbles(col = "grey40", scale=.5) +
tm_shape(hospital) + 
  tm_bubbles(col = "red", shape = 3, scale = .5) +
tm_shape(schools) + 
  tm_bubbles(col = "yellow", scale = .25, shape= 23) +
tm_scale_bar(position = c("left")) +
tm_layout(bg.color="white", inner.margins=c(.05,.1, .12,.12), title = "Shelby County, TN Basemap") 
## tmap mode set to plotting

## I could not figure how to get a legend for the symbols (+ is hospital, etc...)