Skip to content
R for the Rest of Us Logo

Going Deeper with R

Bring It All Together (Advanced Data Wrangling)

Transcript

Click on the transcript to go to that point in the video. Please note that transcripts are auto generated and may contain minor inaccuracies.

View code shown in video
# Load Packages -----------------------------------------------------------

library(tidyverse)
library(janitor)

# Import Data -------------------------------------------------------------

survey_data_raw <- read_tsv("data-raw/2020-combined-survey-final.tsv") |> 
  clean_names() |> 
  mutate(id = row_number())


# Exploration -------------------------------------------------------------

survey_data_raw |> 
  glimpse()

survey_data_raw
count(qr_learning_path) |> 
  arrange(desc(n))


# Tidying -----------------------------------------------------------------

other_coding_languages <- 
  survey_data_raw |> 
  select(id, qcoding_languages) |> 
  separate_longer_delim(qcoding_languages,
                        delim = ", ")

demographics <- survey_data_raw |> 
  select(id, qyear_born:qcountry)


# Export ------------------------------------------------------------------

other_coding_languages |> 
  write_rds("data/other_coding_languages.rds")

demographics |> 
  write_rds("data/demographics.rds")

Have any questions? Put them below and we will help you out!

You need to be signed-in to comment on this post. Login.

Course Content

44 Lessons