[R] Dividing a map by electoral results with R?

David Winsemius dwinsemius at comcast.net
Thu Mar 5 22:12:04 CET 2015


On Mar 5, 2015, at 10:09 AM, Evelyne1991 wrote:

> Hi everyone,
> 
> I would like to divide a map of Germany vertically by the electoral results
> of 2013:
> 
>> VoteGermany2013
>    Party Result
> 1 CDU/CSU   49.4
> 2     SPD   30.5
> 3   LINKE   10.2
> 4  GRUENE   10.0
> 
> What I'm looking for is very simple: a map divided like a one-bar graph,
> with 49.4% of the lenght for CDU/CSU, 30.5% for SPD and so on. It would be
> like a single bar divided in parts, but with the form of a country (quite
> simple in fact).
> 
> For the map, I'm using:
> 
> library(maps)
> library(mapdata)
> map("worldHires","Germany")
> 
> Would someone be able to help me?

Please do not crosspost to Rhelp and StackOverflow.
> 
> View this message in context: http://r.789695.n4.nabble.com/Dividing-a-map-by-electoral-results-with-R-tp4704211.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ####
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

David Winsemius
Alameda, CA, USA



More information about the R-help mailing list