0

I mapped overdose deaths of Philadelphia by zip code: https://6abc.com/5978005/ I wanted to display zip codes on the face of the map but couldn't figure out how to. This is what I wanted my map to look like: Philadelphia Overdose Deaths Map

Is there any function I can use to display zip codes on the face of the map like this?

  • 1
    Don't know of a function but there is a whole package here `tidycensus` here: https://walkerke.github.io/tidycensus/articles/basic-usage.html You can use the variable `zcta` for zipcode. Take a look. – CaseebRamos Mar 03 '20 at 01:39
  • 1
    One approach is to calculate the centroid for each zip code (with `gCentroid` from `rgeos` package), and then use `addLabelOnlyMarkers` using the centroid information. An example is [here](https://stackoverflow.com/a/48147823/3460670). – Ben Mar 03 '20 at 02:33

0 Answers0