-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
R Data Visualization Recipes
By :
If you want to analyze a specific region better, you might want to zoom in on the map. By doing this, a more detailed and better looking map is achieved. It's not hard to take the previous choropleth and zoom it. Although it's easy to obtain such a result, trusting the wrong tools leads to lame outcomes, so it's important to keep it straight.
With this recipe, we will zoom in on the tri-state area (New York, New Jersey, and Connecticut). Besides zooming in, we will outline them by coloring the outer states with grey. For now, go ahead and check the requirements.
This recipe requires the choropleth and merged_data objects created by the last recipe, Crafting choropleth using ggplot2, hence automatically requesting the same requirements from it. Having ggplot2 installed, the choropleth object and merged_data in your environment would be enough.
We can zoom into the map as follows:
%in% operator to create data that will...