Skip to content

Instantly share code, notes, and snippets.

View ikashnitsky's full-sized avatar

Ilya Kashnitsky ikashnitsky

View GitHub Profile
@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, ilya.kashnitsky@gmail.com, @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, 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
#===============================================================================
# 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 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, 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
@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, ilya.kashnitsky@gmail.com, @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, ilya.kashnitsky@gmail.com, @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, ilya.kashnitsky@gmail.com, @ikashnitsky
#===============================================================================
library(tidyverse)
library(magrittr)
library(hrbrthemes)
library(countrycode)
#===============================================================================
# 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 January 22, 2022 20:06
All 2021 papers with Altmetric attention score 1,000+, sorted first by news_mentions and then by altmetric_attention_score
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
3832,Toxic Epidermal Necrolysis Post COVID-19 Vaccination - First Reported Case,Cureus,2168-8184,NA,NA,Article,TRUE,gold,11 Medical and Health Sciences; 1107 Immunology,Alfaisal University; Prince Mohammed bin Abdulaziz Hospital,NA,2021-08-16,10.7759/cureus.17215,NA,NA,NA,34540442,NA,NA,NA,NA,NA,NA,NA,0,0,0,0,6391,0,0,1,1,0,0,0,0,0,0
@ikashnitsky
ikashnitsky / elon.R
Last active January 19, 2022 12:50
Example of population size estimate using stationary assumption (Elon Musk) -- https://twitter.com/ikashnitsky/status/1483740904892608513
#===============================================================================
# 2022-01-19 -- twitter
# Musk stationary population estimate -- minimal US example
# Ilya Kashnitsky, ilya.kashnitsky@gmail.com, @ikashnitsky
#===============================================================================
library(tidyverse)
library(magrittr)
library(hrbrthemes)