Skip to content

Instantly share code, notes, and snippets.

@cmrivers
Created January 20, 2016 14:23
Show Gist options
  • Save cmrivers/284ca2a7e1cfd64a95a7 to your computer and use it in GitHub Desktop.
Save cmrivers/284ca2a7e1cfd64a95a7 to your computer and use it in GitHub Desktop.
A random collection of facts and some sketchy math re: zika
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"A random collection of facts and some sketchy math."
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"outbreak_duration = 6\n",
"microcephalic_births_brazil = 3500 #microcephalic births during outbreak period\n",
"births_during_outbreak = (3.5e6/12)*outbreak_duration #all births during outbreak period\n",
"attack_rate = .73 #attack rate from Yap Island \n",
" #(likely overestimate due to xreactivity)"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"0.003"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"risk = microcephalic_births_brazil / (births_during_outbreak * attack_rate)\n",
"round(risk, 3)"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"def six_month_incidence(annual_births):\n",
" births_in_study_period = annual_births/outbreak_duration\n",
" births_to_infected_mothers = births_in_study_period * attack_rate\n",
" \n",
" expected_cases = births_to_infected_mothers * risk\n",
" \n",
" return int(round(expected_cases, 0))"
]
},
{
"cell_type": "code",
"execution_count": 37,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"hawaii = six_month_incidence(18987)"
]
},
{
"cell_type": "code",
"execution_count": 38,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"6"
]
},
"execution_count": 38,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"hawaii"
]
},
{
"cell_type": "code",
"execution_count": 39,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"puerto_rico = six_month_incidence(36486)"
]
},
{
"cell_type": "code",
"execution_count": 40,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"12"
]
},
"execution_count": 40,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"puerto_rico"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"http://www.who.int/csr/don/8-january-2016-brazil-microcephaly/en/\n",
"http://www.eurosurveillance.org/images/dynamic/EE/V19N09/art20720.pdf\n",
"http://www.cdc.gov/nchs/data/nvsr/nvsr64/nvsr64_01.pdf"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.10"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment