Here is the code I'm trying to run:
ch4_useful_data <- ch4_data %>%
select("CH4 (ppm)", "Latitude", "Longitude")
followed by:
Map <- get_map(location=c(lon = -79.15784454, lat = 40.61871338), source="google", maptype="satellite", zoom=16)
Map_Plot <- ggmap(Map, extent = "panel", ylab = "Latitude", xlab = "Longitude")
Map_Plot + geom_point(data = chr_data, aes(x = longitude, y = latitude, color = "CH4 (ppm)"), size = 8, alpha = 0.5) scale_color_gradient(colours = myPalette(100), limits = c(2, 15), name = "[CH4] ppm") +
labs( y = "Latitude", x = "Longitude", title = "Methane Map")
This latter chunk returns:
"Error: unexpected symbol in "Map_Plot + geom_point(data = chr_data, aes(x = longitude, y = latitude, color = "CH4 (ppm)"), size = 8, alpha = 0.5) scale_color_gradient"
I've been staring at it for an hour, what character is unexpected here? Or is it a deeper issue related to something like data formatting from a previous step?