Left joining questions and tags
Three of the Stack Overflow survey datasets are questions
, question_tags
, and tags
:
questions
: an ID and the score, or how many times the question has been upvoted; the data only includes R-based questionsquestion_tags
: a tag ID for each question and the question's idtags
: a tag id and the tag's name, which can be used to identify the subject of each question, such as ggplot2 or dplyr
In this exercise, we'll be stitching together these datasets and replacing NAs in important fields.
Note that we'll be using left_join
s in this exercise to ensure we keep all questions, even those without a corresponding tag. However, since we know the questions
data is all R data, we'll want to manually tag these as R questions with replace_na
.
This exercise is part of the course
Joining Data with dplyr
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Join the questions and question_tags tables
questions %>%
___