Skip to content

Instantly share code, notes, and snippets.

View ikashnitsky's full-sized avatar

Ilya Kashnitsky ikashnitsky

View GitHub Profile
@ikashnitsky
ikashnitsky / odds-qatar.R
Last active December 3, 2022 12:50
Were there too many sensations in Qatar? What if I bet the same amount against the odds in all the group-stage games?
#===============================================================================
# 2022-12-03 -- misc
# World Cup games odds
# Ilya Kashnitsky, [email protected], @ikashnitsky
#===============================================================================
library(tidyverse)
library(magrittr)
library(rvest)
library(ggrepel)
@ikashnitsky
ikashnitsky / fedified.R
Last active November 19, 2022 21:49
Explore the twitter accounts included in fedified.com -- https://fosstodon.org/@ikashnitsky/109372644538546176
#===============================================================================
# 2022-11-19 -- exploration
# Explore the list from fedified dot com
# Ilya Kashnitsky, [email protected], @ikashnitsky
#===============================================================================
options(scipen = 999)
library(tidyverse)
library(magrittr)
library(rvest)
@ikashnitsky
ikashnitsky / year-progress.R
Last active July 19, 2022 15:45
Popularity of the @year_progress tweets by the % of the year that they mark – https://twitter.com/ikashnitsky/status/1546012109720506369
#===============================================================================
# 2022-07-09 -- twitter
# Year progress twitter
# Ilya Kashnitsky, [email protected], @ikashnitsky
#===============================================================================
library(tidyverse)
library(magrittr)
library(lubridate)
library(hrbrthemes)
@ikashnitsky
ikashnitsky / citation-water-bubbles.R
Last active July 19, 2022 15:15
Draw automatically citation water bubbles plot for the journal of your choice, you need to input Scopus dataframe – https://twitter.com/ikashnitsky/status/1529195306981662720
#===============================================================================
# 2022-05-23 -- twitter
# citation water bubbles plot
# Ilya Kashnitsky, [email protected], @ikashnitsky
#===============================================================================
# This script introduces a function that draws a citation water bubbles plot
# https://twitter.com/ikashnitsky/status/1528834190908739587
# The only necessary input is a dataframe with journal's papers exported from
# Scopus. Note: that Scopus only allows to download 2000 entries at once. If
#===============================================================================
# 2022-05-18 -- sjrdata
# Illustrate the package using some demographic journals
# Ilya Kashnitsky, [email protected], @ikashnitsky
#===============================================================================
library(tidyverse)
library(hrbrthemes)
library(sjrdata)
@ikashnitsky
ikashnitsky / improve-plot-dhs-tfr.R
Last active May 4, 2022 21:13
RotateTheDamnPlot example, Figure 2 from doi.org/10.4054/DemRes.2022.46.29, see https://twitter.com/ikashnitsky/status/1521960898440613889
#===============================================================================
# 2022-05-04 -- twitter
# Improve plot
# https://twitter.com/ikashnitsky/status/1521960898440613889
# Ilya Kashnitsky, [email protected], @ikashnitsky
#===============================================================================
# Corker, J., Jamaica, Rossier, C., & Zan, L. M. (2022). Fertility among better-off women in sub-Saharan Africa: Nearing late transition levels across the region. Demographic Research, 46(29), 849–864. https://doi.org/10.4054/DemRes.2022.46.29
# Improve figure 2 -- RotateTheDamnPlot
@ikashnitsky
ikashnitsky / analyse-sara-tweets.R
Last active July 19, 2022 15:44
analyze the frequency of @SaraCarterDC tweets around the horse story – https://twitter.com/ikashnitsky/status/1495170804945981444
#===============================================================================
# 2022-02-19 -- twitter
# analyze the frequency of @SaraCarterDC tweets around the horse story
# Ilya Kashnitsky, [email protected], @ikashnitsky
#===============================================================================
library(tidyverse)
library(magrittr)
library(hrbrthemes)
library(lubridate)
@ikashnitsky
ikashnitsky / sci-hub-latest-reads.r
Created February 12, 2022 22:22
Scrape 'latest read' papers from sci-hub home page and plot the years when these papers were written -- https://twitter.com/ikashnitsky/status/1492624193141288965
#===============================================================================
# 2022-02-12 -- twitter
# sci-hub latest reads -- look years
# Ilya Kashnitsky, [email protected], @ikashnitsky
#===============================================================================
library(tidyverse)
library(magrittr)
library(xml2)
library(rvest)
#===============================================================================
# 2022-02-10 -- twitter
# Digitize data from: Miller, J. D., Scott, E. C., & Okamoto, S. (2006). Public Acceptance of Evolution. Science. https://doi.org/10.1126/science.1126746
# Ilya Kashnitsky, [email protected], @ikashnitsky
#===============================================================================
library(tidyverse)
library(magrittr)
library(hrbrthemes)
library(countrycode)
#===============================================================================
# 2022-02-05 -- twitter
# Young Demographers in twitter
# Ilya Kashnitsky, [email protected], @ikashnitsky
#===============================================================================
library(tidyverse)
library(magrittr)
library(hrbrthemes)
library(rtweet)