I am trying to create two versions of the world map with one data table. The columns of the data table are: Country Name iso3 FormDate The FormDate variable is a date - in this case, the date the country was officially formed. (as seen here - http://en.wikipedia.org/wiki/List_of_sovereign_states_by_date_of_formation)
formdate <- read.table(text="
ISO3\tCountry\tFormation Date
DZA\tAlgeria\t07-03-1962
AGO\tAngola\t11-11-1975
BWA\tBotswana\t09-30-1966
CMR\tCameroon\t01-01-1960
BGD\tBangladesh\t03-26-1971
IND\tIndia\t08-15-1947
ISR\tIsrael\t05-14-1948
LOS\tLaos\t10-22-1953
MYS\tMalaysia\t09-16-1963
SGP\tSingapore\t08-09-1965"
,sep="\t",header=TRUE)
> formdate
ISO3 Country Formation.Date
1 DZA Algeria 07-03-1962
2 AGO Angola 11-11-1975
3 BWA Botswana 09-30-1966
4 CMR Cameroon 01-01-1960
5 BGD Bangladesh 03-26-1971
6 IND India 08-15-1947
7 ISR Israel 05-14-1948
8 LOS Laos 10-22-1953
9 MYS Malaysia 09-16-1963
10 SGP Singapore 08-09-1965
The maps I would like to create are:
1: a summary map with each country color-coded by its year of formation, binned automatically in say 5-7 categories.
2: a 3-fold facet map, with separate panels showing independent countries born by 1945, after 1945 up to 1965 and anytime after that. Trouble is that I would love to be able to change these cutoff years.
This question is related to Using [R] maps package - colouring in specific nations on a world map, RScript to create World Map with own values and How to create a world map in R with specific countries filled in?, like those I am also trying to create a map with own values.
The difference here is that I need to use a date variable, and specifically, to plot binned values of those dates.
Help and advice would be very appreciated.