Skip to content

Instantly share code, notes, and snippets.

Avatar

Ilya Kashnitsky ikashnitsky

View GitHub Profile
@ikashnitsky
ikashnitsky / citation-water-bubbles.R
Last active May 23, 2022
Draw automatically citation water bubbles plot for the journal of your choice, you need to input Scopus dataframe
View citation-water-bubbles.R
#===============================================================================
# 2022-05-23 -- twitter
# citation water bubbles plot
# Ilya Kashnitsky, ilya.kashnitsky@gmail.com, @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
View sjr-demographic-journals.R
#===============================================================================
# 2022-05-18 -- sjrdata
# Illustrate the package using some demographic journals
# Ilya Kashnitsky, ilya.kashnitsky@gmail.com, @ikashnitsky
#===============================================================================
library(tidyverse)
library(hrbrthemes)
library(sjrdata)
@ikashnitsky
ikashnitsky / improve-plot-dhs-tfr.R
Last active May 4, 2022
RotateTheDamnPlot example, Figure 2 from doi.org/10.4054/DemRes.2022.46.29, see https://twitter.com/ikashnitsky/status/1521960898440613889
View improve-plot-dhs-tfr.R
#===============================================================================
# 2022-05-04 -- twitter
# Improve plot
# https://twitter.com/ikashnitsky/status/1521960898440613889
# Ilya Kashnitsky, ilya.kashnitsky@gmail.com, @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
View analyse-sara-tweets.R
#===============================================================================
# 2022-02-19 -- twitter
# analyze the frequency of @SaraCarterDC tweets around the horse story
# Ilya Kashnitsky, ilya.kashnitsky@gmail.com, @ikashnitsky
#===============================================================================
library(tidyverse)
library(magrittr)
library(hrbrthemes)
library(lubridate)
@ikashnitsky
ikashnitsky / sci-hub-latest-reads.r
Created Feb 12, 2022
Scrape 'latest read' papers from sci-hub home page and plot the years when these papers were written -- https://twitter.com/ikashnitsky/status/1492624193141288965
View sci-hub-latest-reads.r
#===============================================================================
# 2022-02-12 -- twitter
# sci-hub latest reads -- look years
# Ilya Kashnitsky, ilya.kashnitsky@gmail.com, @ikashnitsky
#===============================================================================
library(tidyverse)
library(magrittr)
library(xml2)
library(rvest)
View evol-and-vaxx.R
#===============================================================================
# 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, ilya.kashnitsky@gmail.com, @ikashnitsky
#===============================================================================
library(tidyverse)
library(magrittr)
library(hrbrthemes)
library(countrycode)
View yd-twitter.R
#===============================================================================
# 2022-02-05 -- twitter
# Young Demographers in twitter
# Ilya Kashnitsky, ilya.kashnitsky@gmail.com, @ikashnitsky
#===============================================================================
library(tidyverse)
library(magrittr)
library(hrbrthemes)
library(rtweet)
@ikashnitsky
ikashnitsky / export-all-papers-2021-1000-plus.csv
Created Jan 22, 2022
All 2021 papers with Altmetric attention score 1,000+, sorted first by news_mentions and then by altmetric_attention_score
View export-all-papers-2021-1000-plus.csv
We can't make this file beautiful and searchable because it's too large.
altmetric_attention_score,title,journal_collection_title,journal_iss_ns,authors_at_my_institution,departments,output_type,oa_status,oa_type,subjects_fo_r,affiliations_grid,funder,publication_date,doi,isbn,national_clinical_trial_id,uri,pub_med_id,pub_med_central_id,handle_net_i_ds,ads_bibcode,ar_xiv_id,re_p_ec_id,ssrn,urn,news_mentions,blog_mentions,policy_mentions,patent_mentions,twitter_mentions,peer_review_mentions,weibo_mentions,facebook_mentions,wikipedia_mentions,google_mentions,linked_in_mentions,reddit_mentions,pinterest_mentions,f1000_mentions,q_a_mentions,video_mentions,syllabi_mentions,number_of_mendeley_readers,number_of_dimensions_citations,details_page_url,badge_url
@ikashnitsky
ikashnitsky / elon.R
Last active Jan 19, 2022
Example of population size estimate using stationary assumption (Elon Musk) -- https://twitter.com/ikashnitsky/status/1483740904892608513
View elon.R
#===============================================================================
# 2022-01-19 -- twitter
# Musk stationary population estimate -- minimal US example
# Ilya Kashnitsky, ilya.kashnitsky@gmail.com, @ikashnitsky
#===============================================================================
library(tidyverse)
library(magrittr)
library(hrbrthemes)
View c19-ifr-vs-hmd.R
#===============================================================================
# 2022-01-17 -- twitter
# c19 IFR vs normal mortality
# Ilya Kashnitsky, ilya.kashnitsky@gmail.com, @ikashnitsky
#===============================================================================
library(tidyverse)
library(magrittr)
library(hrbrthemes)
library(reticulate)