Last active
January 4, 2016 16:44
-
-
Save dhimmel/81f55d62af27197a845e to your computer and use it in GitHub Desktop.
Growth of bioscience preprints in 2015
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
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Growth of bioscience preprints in 2015\n", | |
"\n", | |
"By Daniel Himmelstein ([@dhimmel](https://twitter.com/dhimmel))" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"import datetime" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"*PeerJ* [started](https://peerj.com/blog/post/47030855181/peerj-preprints-a-new-preprint-server-for-the-biological-and-medical-sciences/) accepting preprints on April 3, 2013. *bioRxiv* [opened on](http://news.sciencemag.org/biology/2013/11/new-preprint-server-aims-be-biologists-answer-physicists-arxiv) November 11, 2013. [Click here](https://doi.org/10.1038/503180a) to read more about the beginnings." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"start_dates = {\n", | |
" 'PeerJ': datetime.date(2013, 4, 3),\n", | |
" 'bioRxiv': datetime.date(2013, 11, 11),\n", | |
"}" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"articles_before_2015 = {\n", | |
" 'PeerJ': 772,\n", | |
" 'bioRxiv': 996,\n", | |
"}\n", | |
"\n", | |
"articles_in_2015 = {\n", | |
" 'PeerJ': 1622 - 772,\n", | |
" 'bioRxiv': 1776,\n", | |
"}" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [], | |
"source": [ | |
"apd_before_2015, apd_in_2015, growth = {}, {}, {}\n", | |
"for repo in 'PeerJ', 'bioRxiv':\n", | |
" # compute average articles per day prior to 2015\n", | |
" start_date = start_dates[repo]\n", | |
" days_before_2015 = (datetime.date(2015, 1, 1) - start_date).days\n", | |
" apd_before_2015[repo] = articles_before_2015[repo] / days_before_2015\n", | |
" # compute average articles per day in 2015\n", | |
" apd_in_2015[repo] = articles_in_2015[repo] / 365\n", | |
" # compute percent increase in articles per day in 2015 compared to before 2015\n", | |
" growth[repo] = 100 * (apd_in_2015[repo] - apd_before_2015[repo]) / apd_before_2015[repo]" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"{'PeerJ': 1.2100313479623825, 'bioRxiv': 2.394230769230769}" | |
] | |
}, | |
"execution_count": 5, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"# average articles per day prior to 2015\n", | |
"apd_before_2015" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 6, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"{'PeerJ': 2.328767123287671, 'bioRxiv': 4.865753424657535}" | |
] | |
}, | |
"execution_count": 6, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"# average articles per day in 2015\n", | |
"apd_in_2015" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 7, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"{'PeerJ': 92.45510682092412, 'bioRxiv': 103.22825548770427}" | |
] | |
}, | |
"execution_count": 7, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"# percent increase in articles per day in 2015 compared to before 2015\n", | |
"growth" | |
] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.4.3" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment