## 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 →

## Graphing Pew survey responses with ggplot in R

Packages we will need: We are going to look at a few questions from the 2019 US Pew survey on relations with foreign countries. Data can be found by following this link: We are going to make bar charts to plot out responses to the question asked to American participaints: Should the US cooperate more … Continue reading Graphing Pew survey responses with ggplot in R →

## Lollipop plots with ggplot2 in R

Packages we will need: We will plot out a lollipop plot to compare EU countries on their level of income inequality, measured by the Gini coefficient. A Gini coefficient of zero expresses perfect equality, where all values are the same (e.g. where everyone has the same income). A Gini coefficient of one (or 100%) expresses … Continue reading Lollipop plots with ggplot2 in R →

## across() function appreciation

Wrangle and change multiple columns with the across() function from dplyr. So quick! So simple! Mutate all numeric variables and calculate the country mean across all years in the dataset. Then use .names = argument to give a new column variable name! And optional code if you want to make the graph a bit prettier. … Continue reading across() function appreciation →

## 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) →

## Alternatives to pie charts: coxcomb and waffle charts

Packages we will need If we want to convey nuance in the data, sometimes that information is lost if we display many groups in a pie chart. According to Bernard Marr, our brains are used to equal slices when we think of fractions of a whole. When the slices aren’t equal, as often is the … Continue reading Alternatives to pie charts: coxcomb and waffle charts →

Loading…

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

### Follow My Blog

Get new content delivered directly to your inbox.