This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### DATA PREP ### | |
| # loading the unemployment data | |
| unempl <- read.delim2(file="./data/data_germany_unemployment_by_ | |
| county.txt", header = TRUE, sep = "\t", | |
| dec=",", stringsAsFactors=F) | |
| # due to Mac OS encoding, otherwise not needed | |
| gadm_names <- iconv(gadm$NAME_3, "ISO_8859-2", "UTF-8") | |
| # fuzzy matching of data: quick & dirty |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(sp) | |
| library(RColorBrewer) | |
| # get spatial data for Germany on county level | |
| con <- url("http://gadm.org/data/rda/DEU_adm3.RData") | |
| print(load(con)) | |
| close(con) | |
| # plot Germany with random colors | |
| col = rainbow(length(levels(gadm$NAME_3))) |
NewerOlder