Mapping postal codes on country map using R


I have csv with zip codes and business category. I want to map all categories on the country map using varying colors. How do I go about this using R? Please note: I do not have lat. and long. co-ordinates for the zip codes. Also, I am in non-US country (so can’t use zipcode package) Would appreciated any help from you guys.

Thanks in advance



You can use library ggmap for returning latitude and longitude using zip code.


lon lat
77.3333 28.5167



Hi @sadashivb,

After adding the lat & lon as suggested by @Imran you can do:

newmap <- getMap(resolution = "low")
plot(newmap, xlim = c(-20, 59), ylim = c(35, 71), asp = 1)
points(airports$lon, airports$lat, col = "red", cex = .6)  

This should give something like:

Hope this helps!!


Many thanks @imran & @shuvayan. Your suggestions worked fine. The only change I did from what suggested above was: in case of using pincode in geocode function, I used the place.