library(RColorBrewer)
library(terra)
Loading required package: viridisLite
Linking to GEOS 3.14.1, GDAL 3.12.1, PROJ 9.7.1; sf_use_s2() is TRUE
library(ggplot2)
library(dplyr)
Attaching package: 'dplyr'
The following objects are masked from 'package:terra':
intersect, union
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
ca_places = st_read("ca_places/ca_places.shp", quiet = TRUE)
path_to_data = system.file("shape/nc.shp", package = "sf")
countries = st_read("countries/countries.shp")
Reading layer `countries' from data source
`C:\Users\u1221910\OneDrive\Desktop\GEOG 5680\Data\Module 12\countries\countries.shp'
using driver `ESRI Shapefile'
Simple feature collection with 177 features and 64 fields
Geometry type: MULTIPOLYGON
Dimension: XY
Bounding box: xmin: -180 ymin: -90 xmax: 180 ymax: 83.64513
CRS: NA
countries = st_set_crs(countries, 4326)