I am using R LeaftLet package to create a interactive choropleth of the US Map.

Now my question I want both in one map itself but make zip code visible as I zoom in a state or double click on a state. Like If I double click on New York , the New York Zip Code opens up. Is there a package/function in R that can help me do this?

Solved myself and help of others.


You may want to have a look at mapView which is capable of doing such things. For further information, check out this brief tutorial. Say your dataset is a 'SpatialPolygonsDataFrame' and the zip code is part of the referring attribute table, this can be easily done.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.