There are some packages, such as ggplot2, tidyverse, dplyr, readxl etc. that did a great job finding their way into our lives. If you used ggplot2 before, you wouldn’t be able to live without it again (I promise). So, naturally the number of downloads of the applicable packages are higher than that of low-level packages which created to do some fun thing, make you laugh, be your fortune teller etc.
In this visualization, I used my favorite package cranlogs in which returns top downloaded packages’ statistics real-time using a super-simple code. All you need to do is to import the packages:
library(ggplot2)
library(cranlogs)
library(extrafont)
## Registering fonts with R
loadfonts()
Using the one and only ggplot2 package, I represent the results like this:
# top 10 package downloads
top_10_october <- cran_top_downloads(when = "last-month", count = 10)
top_10_october
## rank package count from to
## 1 1 ggplot2 2700973 2021-08-23 2021-09-21
## 2 2 rlang 1989661 2021-08-23 2021-09-21
## 3 3 sf 1962960 2021-08-23 2021-09-21
## 4 4 devtools 1648516 2021-08-23 2021-09-21
## 5 5 ragg 1646694 2021-08-23 2021-09-21
## 6 6 vctrs 1646057 2021-08-23 2021-09-21
## 7 7 textshaping 1645240 2021-08-23 2021-09-21
## 8 8 lifecycle 1637052 2021-08-23 2021-09-21
## 9 9 pillar 1625984 2021-08-23 2021-09-21
## 10 10 ellipsis 1601966 2021-08-23 2021-09-21
ggplot(data=top_10_october, aes(y=reorder(package,count), x=count)) +
geom_bar(stat="identity", col="steelblue", fill='steelblue')+
geom_text(aes(label=count), hjust=1.2, size=4.9, col='yellow')+
theme_minimal()+
labs(title = "Top 10 Most Downloaded R Packages in the Past Month",
subtitle = paste('from', top_10_october$from[1], 'to', top_10_october$to[1]),
y = "",x = "# of Times Downloaded") +
annotate("text", x = 2400100, y = 5, label = "Telegram: @RStudio_ir", col='blue', size=4)+
theme(axis.text.x = element_text(color = "grey20", size = 12, angle = 0, hjust = .5, vjust = .5, face = "plain"),
axis.text.y = element_text(color = "blue", size = 15, angle = 0, hjust = 1, vjust = 0, face = "plain"),
axis.title.x = element_text(color = "red", size = 12, angle = 0, hjust = .5, vjust = 0, face = "plain"),
axis.title.y = element_text(color = "grey20", size = 12, angle = 90, hjust = .5, vjust = .5, face = "plain"))
The results show that ggplot2 is the most downloaded packages in the last month and this results have been held for a long time. I must say ggplot2 is the best because the world wants visualization.
Thanks for reading