I'm relatively new to R, so any imput would be greatly appreciated. The code I'm writing is about graphing certain spanich cedar populations across America. I was able to export a map using ggmap, and although the map can be visualized, the function geom_point is not displaying the data exported from an Excel. The Excel doc has the latitude and longitude for the location of each population, and I would like it to apper in the map with a dot.
This is my code so far:
knitr::opts_chunk$set(echo = TRUE, message = FALSE, warning = FALSE)
library(tidyverse)
library(googlesheets4)
library(openintro)
library(maps)
library(ggmap)
library(ggplot2)
library(ggthemes)
gs4_deauth()
theme_set(theme_minimal())
map_americas <- get_stamenmap(
bbox = c(left = -101, bottom = 10, right = -81, top = 21),
maptype = "terrain",
zoom = 6
)
ggmap(map_americas) +
geom_point(data = data_map,
aes(x = lat, y = lon, color = Ho),
size = 5) +
theme_map()
And this is the messege I receive back after running it:
Warning message:
Removed 33 rows containing missing values (geom_point).
Thank you!