I'm trying to create a map of USA with points of earnings by state.
for example I have these data:
state capital_name lat long women earning
1 Alabama Montgomery 32.36154 -86.27912 621 832
2 Alaska Juneau 58.30194 -134.41974 797 1008
3 Arizona Phoenix 33.44846 -112.07384 669 827
4 Arkansas Little Rock 34.73601 -92.33112 610 703
For now this is my code:
mapPoints <- ggmap(map) +
geom_point(aes(x = lat, y = long, size = sqrt(women_median_weekly_earnings)),
data = join2, alpha = .5 ,color="darkred") +
scale_size(range=c(3,20))
map <- get_map(location = 'usa', zoom = 4)
mapPoints
This what I get:
As you can see, the points are not on the map. What is wrong with the code?
How can I fix it?
Thank you very much