Country Picker

Paul King
12 March 2017

The Commission

My client, a project manager for a development NGO, wanted to be able to produce simple map images with specific countries highlighted.

The tool had to:

  • be easy and quick to use from any browser
  • allow map images to be saved as an image
  • be useable interactively

The pilot

The initial proposal uses a shiny app based on the rworldmap package. The aims of this pilot are:

  • to demonstrate that a useable tool can be built, and shared, quickly
  • to establish a base for further discussions with the client about their detailed needs and formatting requirements
  • to produce something quick and dirty to act as a base for future exploration and development

Initial data

The tool intitially uses the example country data provided with rworldmap. The default countries selected are those where the NGO currently operates.

Figures below are calculated from the raw data set, for example:

ngoPopulation <- sum(ngoData$Population2005)/1000
  • 9 countries
  • total population (2005) of 323.1 million
  • average GDP per capita of 1163 USD
  • all except one of the countries are in Africa

The default map

Can you name the non-African country highlighted?

plot of chunk plot_map