How can you determine which programming languages and technologies are most widely used? Which languages are gaining or losing popularity, helping you decide where to focus your efforts?
One excellent data source is Stack Overflow, a programming question-and-answer site with more than 16 million questions on programming topics. Each Stack Overflow question is tagged with a label identifying its topic or technology. By counting the number of questions related to each technology, you can estimate the popularity of different programming languages.
In this project, you will use data from the Stack Exchange Data Explorer to examine the relative popularity of R compared to other programming languages.
You'll work with a dataset containing one observation per tag per year, including the number of questions for that tag and the total number of questions that year.
stack_overflow_data.csv
Column | Description |
---|---|
year | The year the question was asked (2008-2020) |
tag | A word or phrase that describes the topic of the question, such as the programming language |
num_questions | The number of questions with a certain tag in that year |
year_total | The total number of questions asked in that year |
# Load necessary packages
library(readr)
library(dplyr)
library(ggplot2)
# Load the dataset
data <- read_csv("stack_overflow_data.csv")
# View the dataset
head(data)
# Start coding here
# Use as many cells as you like!
data_percentage <- data %>%
mutate(percentage = (num_questions / year_total) * 100)
r_2020 <- data_percentage %>% filter(year == 2020, tag == 'r')
r_2020
sorted_tags <- data %>%
filter(year >= 2015) %>%
group_by(tag) %>%
summarize(tag_total = sum(num_questions)) %>%
arrange(desc(tag_total))
highest_tags <- sorted_tags %>%
select(tag) %>%
head(n = 5)
print(highest_tags)