Chapter 10. Creating Maps

In this chapter, we will cover the following recipes:

  • Plotting global data by countries on a world map
  • Creating graphs with regional maps
  • Plotting data on Google Maps
  • Creating and reading KML data
  • Working with ESRI shapefiles

Introduction

In this chapter, we will take an in-depth look at visualizing data on geographical maps, building on top of our brief introduction in Chapter 1, R Graphics.

Overlaying datasets from different parts of the world on maps is a very good way of summarizing data in its correct geographical context. A lot of data is being made freely available. For example, the World Bank and World Health Organization (WHO) publish lots of socio-economic and health-related data that can be plotted on maps. Google Maps provides a good API that can be directly connected to from R, as we will see in this chapter.

We will also learn how to work with Geographical Information Systems (GIS) data formats in R.

As with the previous chapters, it is best to try out each recipe first with the example shown here and then with your own datasets so that you can fully understand each line of code.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.134.188