Last active
April 29, 2021 10:03
-
-
Save allatambov/aaab267f9510e0e14c364275131555d0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
install.packages("tidyverse") | |
library(tidyverse) | |
anames <- read.csv("https://allatambov.github.io/twimc/names.csv", encoding = "UTF-8") | |
names18 <- anames %>% filter(Year == 2018 & Month == "январь") | |
names18_f <- names18 %>% filter(Sex == "female") | |
names18_m <- names18 %>% filter(Sex == "male") | |
small_f <- names18_f %>% arrange(NumberOfPersons) %>% tail(10) | |
small_m <- names18_m %>% arrange(NumberOfPersons) %>% tail(10) | |
ggplot(data = small_f, aes(x = Name, y = NumberOfPersons, fill = Name)) + | |
geom_bar(stat = "identity") | |
ggplot(data = small_m, aes(x = Name, y = NumberOfPersons, fill = Name)) + | |
geom_bar(stat = "identity") | |
set.seed(1234) | |
sample(small_f$Name, size = 1) | |
sample(small_m$Name, size = 1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment