#RStats for Political Science

Create density plots with ggridges package in R

Packages we will need: We will plot out the favourability opinion polls for the three main political parties in Ireland from 2016 to 2020. Data comes from Louwerse and Müller (2020) Before we dive into the ggridges plotting, we have a little data cleaning to do. First, we extract the last four “characters” from the … Continue reading Create density plots with ggridges package in R

Comparing mean values across OECD countries with ggplot

Packages we will need: I came across code for this graph by Tanya Shapiro on her github for #TidyTuesday. Her graph compares Dr. Who actors and their average audience rating across their run as the Doctor on the show. So I have very liberally copied her code for my plot on OECD countries. That is … Continue reading Comparing mean values across OECD countries with ggplot

Replicating Eurostat graphs in R

Packages we will need: In this blog, we will try to replicate this graph from Eurostat! It compares all European countries on their Digitical Intensity Index scores in 2020. This measures the use of different digital technologies by enterprises. The higher the score, the higher the digital intensity of the enterprise, ranging from very low … Continue reading Replicating Eurostat graphs in R

Bump charts for ranking with ggbump package in R

Click here for Part 1 and here for Part 2 of the series on Eurostat data – explains how to download and visualise the Eurostat data In this blog, we will look at government expenditure of the European Union! Part 1 will go into detail about downloading Eurostat data with their package. Some quick data … Continue reading Bump charts for ranking with ggbump package in R

Visualize EU data with Eurostat package in R: Part 2 (with maps)

In this post, we will map prison populations as a percentage of total populations in Europe with Eurostat data. Click here to read Part 1 about downloading Eurostat data. Next we will download map data with the rnaturalearth package. Click here to read more about using this package. We only want to zoom in on … Continue reading Visualize EU data with Eurostat package in R: Part 2 (with maps)

Download EU data with Eurostat package in R: Part 1 (with pyramid graphs)

Eurostat is the statistical office of the EU. It publishes statistics and indicators that enable comparisons between countries and regions. With the eurostat package, we can visualise some data from the EU and compare countries. In this blog, we will create a pyramid graph and a Statista-style bar chart. First, we use the get_eurostat_toc() function to … Continue reading Download EU data with Eurostat package in R: Part 1 (with pyramid graphs)

Loading…

Something went wrong. Please refresh the page and/or try again.


Follow My Blog

Get new content delivered directly to your inbox.