<jupyter_start><jupyter_text>Causes of Death in the United States (2011)To visualize the causes of death in the United States, we look at data from the [Centers for Disease Control](http://www.cdc.gov/).To get the most recent information, we start with [data from 2015 (PDF)](http://www.cdc.gov/nchs/data/hus/hus15.pdf019). Table 7 inclues data on the number of legal abortions (699,000 in 2012, the latest year with data available from the CDC). CDC abortion data for 2012 is also given here: [Web](http://www.cdc.gov/reproductivehealth/data_stats/abortion.htm) and [Excel](http://www.cdc.gov/reproductivehealth/data_stats/excel/abortions_2012.xls)The Guttmacher Institute also provides and analyzes abortion data. According to the institute's webpage:>The Guttmacher Institute is a primary source for research and policy analysis on abortion in the United States. In many cases, Guttmacher’s data are more comprehensive than state and federal government sources. The Institute’s work examines the incidence of abortion, access to care and barriers to obtaining services, factors underlying women’s decisions to terminate a pregnancy, characteristics of women who have abortions and the conditions under which women obtain them."[[1]](https://www.guttmacher.org/united-states/abortion)The Guttmacher Institute [September 2016 Fact Sheet](https://www.guttmacher.org/fact-sheet/induced-abortion-united-states?gclid=CjwKEAjw1qHABRDU9qaXs4rtiS0SJADNzJisAvv0VPSG-35GEPayoftb1RwZuF8heovbdZz0u1ns-xoC0cjw_wcB7) indicates that **1.06 million** abortions were performed in 2011. This number is also reported by the CDC in the [2015 document cited above](http://www.cdc.gov/nchs/data/hus/hus15.pdf019). The goal is to compare abortion with other leading causes of death in the United States. We will use the figure of 1.06 million abortions in 2011 reported by the Guttmacher Institute. Data for other causes of death in 2011 data is available from the CDC here: [Deaths: Final Data for 2011 (PDF)](http://www.cdc.gov/nchs/data/nvsr/nvsr63/nvsr63_03.pdf)<jupyter_code>%matplotlib inline
import pandas as pd
from altair import *

df = pd.read_excel('2011_causes_of_death.xlsx')
df.head()
df = df.ix[1:]

df.plot(kind="bar",x=df["Cause"],
                   title="United SttCauses of Death",
                   legend=False)
c = Chart(df).mark_bar().encode(
    x=X('Number:Q',axis=Axis(title='2011 Deaths')),
    y=Y('Cause:O', sort=SortField(field='Number', order='descending', op='sum'))
)
c<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09745425616547335, 'fraction_numerical': 0.03818615751789976, 'mean_word_length': 5.179361179361179, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 2, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '668347', 'license': 'MIT', 'n_tokens_mistral': 863, 'n_tokens_neox': 763, 'n_words': 265, 'path': 'us-deaths.ipynb', 'repo_name': 'mkudija/US-Causes-of-Death', 'size': '2514'}