Mapping the results of the French presidential election

In this post we document the workflow (using R) to produce a choropleth map and an isarithmic map representing the results of the presidential election in France (2nd round, 7 may 2017).

  1. Choropleth map of the results of the presidential election

First, we download a shapefile of the municipalities in France (data source : https://www.data.gouv.fr/fr/datasets/decoupage-administratif-communal-francais-issu-d-openstreetmap (january 2017).  We use this shapefile to map the results of the second round of the presidential election (data source : https://public.opendatasoft.com/explore/dataset/election-presidentielle-2017-tour-2).

setwd(“—“)
library(rgdal)
communes <- readOGR(“.”,”communes-20170112″)

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s