Publications by R | TypeThePipe

Preserving zero-length groups

08.05.2020

This week I learned about another neat trick with tidyverse functions: the argument .drop from the group_by function. To showcase this functionality I made up a simple example with this dataset consisting of nuclear accidents data. original_data <- read_csv("https://query.data.world/s/47s7katrhxxd674ulus425k42l5u4s") Take a sneak peek of the data...

2541 sym R (539 sym/4 pcs) 6 img 3 tbl

Calculating ratios with Tidyverse

12.05.2020

Calculating percentages is a fairly common operation, right? However, doing it without leaving the pipeflow always force me to do some bizarre piping such as double grouping and summarise. I am using again the nuclear accidents dataset, and trying to calculate the percentage of accidents that happened in Europe each year. nuclear_accidents <- rea...

2010 sym R (1621 sym/6 pcs) 4 tbl

Analyzing data from COVID19 R package

26.05.2020

Introduction The idea behind this post was to play and discover some of the info contained in the COVID19 R package which collects data across several governmental sources.This package is being developed by the Guidotti and Ardia from COVID19 Data Hub. Later, I will add to the analysis the historical track record of deaths over last years for som...

2101 sym R (1809 sym/4 pcs)

Analyzing Remote Work in European Countries

13.06.2021

1. Data downloading As we always do, we are going to connect and download the desired data. In this case, our data source is the Eurostat. We download and read the data file. library(tidyverse) download.file("https://ec.europa.eu/eurostat/api/dissemination/sdmx/2.1/data/LFSA_EHOMP/?format=SDMX-CSV&compressed=false", "data.csv") As a first analyti...

2329 sym R (3462 sym/6 pcs) 8 img 2 tbl