Skip to content

Instantly share code, notes, and snippets.

View MirzaCengic's full-sized avatar

Mirza Cengic MirzaCengic

  • Radboud University, BHHU ATRA
  • Nijmegen
View GitHub Profile
# data from http://ec.europa.eu/eurostat/web/gisco/geodata/reference-data/population-distribution-demography/geostat
# Originally seen at http://spatial.ly/2014/08/population-lines/
# So, this blew up on both Reddit and Twitter. Two bugs fixed (southern Spain was a mess,
# and some countries where missing -- measure twice, submit once, damnit), and two silly superflous lines removed after
# @hadleywickham pointed that out. Also, switched from geom_segment to geom_line.
# The result of the code below can be seen at http://imgur.com/ob8c8ph
library(tidyverse)
@dantonnoriega
dantonnoriega / cool-bash-code.sh
Last active April 21, 2024 20:00
a collection of cool bash scripts
# cool bash codes
# search a directory for all lines that match a pattern (not perfect but useful) ------
## e.g. grep is searching for all lines matching "::" in `R/` to determine package calls
## -h hides the file names; -i ignores case
## sed -E uses regular expressions to search and match groups;
## we then sort and use -u
grep -hi :: -R R/* | sed -E 's/(.*)([ ]+[a-z]+::)(.*)/\2/g' | sort -u
# COUNT COLUMNS -----------------
@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