a little new to this so any help would be greatly appreciated. I've loaded a shapefile of all the countries in the world and plotted it. However, I'm having trouble adding a bunch of points from coordinates to the plot. Any help in how to fix this would be greatly appreciated.
Code so far
MeteoriteData <- read.csv("C:/Users/ChaseDickson_/Desktop/College/AERO 689/Semester Project/Meteorite Landings.csv")
MeteoriteData$lat <- as.factor(MeteoriteData$lat)
MeteoriteData$long <- as.factor(MeteoriteData$long)
world <- st_read("C:/Users/ChaseDickson_/Desktop/College/AERO 689/Semester Project/TM_WORLD_BORDERS_SIMPL-0.3/TM_WORLD_BORDERS_SIMPL-0.3.shp")
world <- st_transform(world, crs = 4326)
ggplot() +
geom_sf(data = world) +
theme_bw()
This returns the plot that is attached.
I've tried using
ggplot() +
geom_sf(data = world) +
theme_bw() +
geom_point(data = MeteoriteData, aes(x = lat, y = long)
but that doesn't seem to work as it gives me this error
Error in `calc_limits_bbox()`:
! Scale limits cannot be mapped onto spatial coordinates in `coord_sf()`
ℹ Consider setting `lims_method = "geometry_bbox"` or `default_crs = NULL`.