Visulize your results using Tidyverse

Elaborazione scalabile dei dati in R

Michael Kane

Assistant Professor, Yale University

Missingness by Year

library(ggplot2)
library(tidyr)
library(dplyr)


mort %>% bigtable(c("borrower_gender", "year")) %>% as.data.frame()
Elaborazione scalabile dei dati in R

Missingness by Year

library(ggplot2)
library(tidyr)
library(dplyr)

mort %>% 
  bigtable(c("borrower_gender", "year")) %>% 
  as.data.frame() %>% 
  mutate(Category = c("Male", "Female", "Not Provided", 
                      "Not Applicable", "Missing"))
Elaborazione scalabile dei dati in R

Missingness by Year

library(ggplot2)
library(tidyr)
library(dplyr)

mort %>% 
  bigtable(c("borrower_gender", "year")) %>% 
  as.data.frame() %>% 
  mutate(Category = c("Male", "Female", "Not Provided", 
                      "Not Applicable", "Missing")) %>%
  pivot_longer(-Category, names_to = "Year", values_to = "Count") %>%
  arrange(Year)
Elaborazione scalabile dei dati in R

Missingness by Year

library(ggplot2)
library(tidyr)
library(dplyr)

mort %>% 
  bigtable(c("borrower_gender", "year")) %>% 
  as.data.frame() %>% 
  mutate(Category = c("Male", "Female", "Not Provided", 
                      "Not Applicable", "Missing")) %>%
  pivot_longer(-Category, names_to = "Year", values_to = "Count") %>%
  arrange(Year) %>%
  ggplot(aes(x = Year, y = Count, group = Category, 
                color = Category)) + 
  geom_line()
Elaborazione scalabile dei dati in R

Elaborazione scalabile dei dati in R

Let's practice!

Elaborazione scalabile dei dati in R

Preparing Video For Download...