import ipywidgets as widgets
from ipywidgets import interact, interact_manual
from IPython.display import HTML
HTML('''<script>
code_show=true;
function code_toggle() {
if (code_show){
$('div.input').hide();
} else {
$('div.input').show();
}
code_show = !code_show
}
$( document ).ready(code_toggle);
</script>
<form action="javascript:code_toggle()"><input type="submit" value="Click here to toggle on/off the raw code."></form>''')
You are a data analyst for policymakers in your country.
You have gone through the hard work of cleaning data and presenting them in sensible visualizations to brief your boss. However, while your graphs and diagrams are clean and beautiful, you still need to process some insights and summarize them for your boss.
import numpy as np
import matplotlib.pyplot as plt
# Amalgamated data from The Pharmaceutical Industry in Figures (2018), WHO (2014)
# as well as data from The Growing Pharmaceuticals Market: Expert Forecasts and Analysis (2018)
height = [90, 199, 300, 935, 1170]
bars = ('2000','2010','2014', '2017', '2021 (est)')
y_pos = np.arange(len(bars))
plt.bar(y_pos, height)
plt.xticks(y_pos, bars)
plt.title("Figure 1: Global Spending on Medicine")
plt.ylabel('Value in billion (USD)')
plt.xlabel('Year')
plt.show()
height = [2928, 2616, 2140, 2044, 2116,1918,1954,1690,907,849]
bars = ('2007','2008','2009', '2010', '2011', '2012', '2013', '2014','2015','2016')
y_pos = np.arange(len(bars))
plt.bar(y_pos, height)
plt.xticks(y_pos, bars)
plt.title("Figure 2: Total number of deaths among AIDS cases in Europe")
plt.xlabel('Year')
plt.show()
Source: HIV/AIDS surveillance in Europe 2017, WHO Regional Office
for Europe and European Centre for Disease Prevention and control
(ECDC), November 2017
import pandas as pd
pd.options.display.max_columns = 30
df = pd.read_csv('/home/leekahhow1/spending_healthcare_percentage_GDP.csv')
df
height = [179,413,1044,2558]
bars = ('1970-1980s', '1980-1990s', '1990-2000s', '2000-2010s')
y_pos = np.arange(len(bars))
plt.bar(y_pos, height)
plt.xticks(y_pos, bars)
plt.title("Figure 3: Estimated full cost of bringing a new chemical or biological entity to market (million $, valued at 2013)")
plt.ylabel('Value in billion (USD)')
plt.xlabel('Year')
plt.show()
Source: Joseph. A. DiMasi, Henry G. Grabowski, Ronald W.Hansen, Innovation in the pharmaceutical industry: New estimates of R&D costs, Journal of Health Economics, 47 (2016), 20–33
import os
from IPython.display import Image
fdir = 'images/'
@interact
def show_images(file=os.listdir('images/')):
display(Image(fdir+file))
%%html
<iframe width=900 height =800 src="https://www.youtube.com/embed/3GiIAWFoIJI" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
%%html
When instructed to, click <a href="https://leekahhow.neocities.org/Pharma" target="_blank">here</a> to proceed