This extracts the site name, Latitude, and Longitude data from the imported WISKI metadata associated with each file. Outputs are a shapefile of class SF.
Examples
library(riskyData)
data(crowle); data(bickley); data(barnhurst); data(hollies); data(ledbury);
data(bettwsYCrwyn)
gcs <- getCoords(crowle,
bickley,
barnhurst,
hollies,
ledbury,
bettwsYCrwyn)
gcs
#> Simple feature collection with 6 features and 4 fields
#> Geometry type: POINT
#> Dimension: XY
#> Bounding box: xmin: -3.172591 ymin: 52.0317 xmax: -2.097173 ymax: 52.7993
#> Geodetic CRS: WGS 84
#> stationName WISKI Easting Northing geometry
#> 1 Crowle 457592 393455 255757 POINT (-2.097173 52.2)
#> 2 Bickley 445031 363130 271330 POINT (-2.542565 52.33879)
#> 3 Barnhurst 091266 389910 301620 POINT (-2.15044 52.61225)
#> 4 Hollies 091862 381586 322452 POINT (-2.274545 52.7993)
#> 5 Ledbury 459793 370233 237123 POINT (-2.435301 52.0317)
#> 6 Bettws-Y-Crwyn 441011 320360 281360 POINT (-3.172591 52.4244)
leaflet(gcs) %>%
addTiles() %>%
addCircleMarkers(color = "orangered",
radius = 6,
fillOpacity = 0.8,
stroke = "black",
label = ~stationName,
labelOptions = labelOptions(permanent = TRUE,
noHide = TRUE,
direction = "bottom"))
#> Error in addCircleMarkers(., color = "orangered", radius = 6, fillOpacity = 0.8, stroke = "black", label = ~stationName, labelOptions = labelOptions(permanent = TRUE, noHide = TRUE, direction = "bottom")): could not find function "addCircleMarkers"