I am in the process of making a density map that will represent population density (more specifically, in Virginia) based on zip codes. I have followed the instructions that were given in the thread: Making a zip code choropleth in R using ggplot2 and ggmap (Essentially I copied the code)
However, whenever I tried feeding my own data, an error message occurs: Error in left_join_impl(x, y, by$x, by$y, suffix$x, suffix$y) : Can't join on 'region' x 'region' because of incompatible types (integer / character) In addition: Warning message: In min(xx[xx > upper]) : no non-missing arguments to min; returning Inf
The dataset that I want to use have the same format as "df_pop_zip". However, it just seems there is a problem with using my own data. To be more precise, "df_pop_zip" has two variables: "region"(zip code), and "value"(frequency of the zip code). I have created an excel sheet with two columns "region" and "value" with random zip codes and frequencies.
Can someone please provide any insight to this problem?
Thanks in advance, Martin