Geographic Map

From Displayr
Jump to navigation Jump to search

Plots a geographic map with shading according to data values (known as a choropleth). The first column of the input data should be a list of geographic entities, the subsequent columns contain the data values. The entities may be countries, continents, states, regions or zip/post codes. This blog post describes how to create geographic maps in Displayr. You can also create a small multiples (panel chart) version.

Countries may be specified by name or 3-letter ISO codes. States or regions should be from a single country (e.g. "Florida", "California" or "New South Wales", "Victoria" but not "California", "Victoria"). It is not possible to plot a mixture of continents, countries, states and regions.

The following regions, areas and zip codes are available,

Regions: USA (i.e. Northeast, Midwest, South, West)
Areas: SA4 areas of Australia
Zip codes: Australia, UK (districts, e.g. BD21), USA

Lists of geographic entities may be accessed with the following R code,

library(flipStandardCharts)
CountriesOrContinents("country") # list the countries of the world
CountriesOrContinents("continent") # list the continents
StatesInCountry("Italy") # list the states in a country
ZipcodesInCountry("UK") # list the zip/post codes in a country
AreasInCountry("Australia") # list the areas in a country

Example