Justetc Social Services (non-profit)Jan 31 · 16 min read This code works with the data on the excel file: indicator-methodology.xls Purpose: Find out prominant indicators — this might also mean the critical aspect of health Find out the measurements that are used to find the quality Code Reference: This code heavily makes use of the code provided on …
Category: AI ML DS RL DL NN NLP Data Mining Optimization
Feb 07
Quality of Care, Health System Performance, Canada and Other Countries
Justetc Social Services (non-profit)Jan 31 · 5 min read import pandas as pdimport matplotlib.pyplot as plt%matplotlib inlinefrom __future__ import print_functionfrom ipywidgets import interact, interactive, fixed, interact_manualimport ipywidgets as widgetsquality_of_care = pd.read_excel(‘../data/quality-of-care.xls’)quality_of_care.head() # find all indicatorsquality_of_care.set_index([‘Indicator’])indicators = pd.Index(quality_of_care[‘Indicator’]).unique()# find all yearsyears = quality_of_care[‘Data year’].dropna().unique()indicators[0], years(’30-Day In-Hospital Fatality: AMI’, array([2015, 2014, 2013, ‘Not applicable’, ‘2013’, ‘2014’, ‘2015’, ‘2012 to 2014’, …
Feb 07
primary-prescribing, Health System Performance, Canada and Others
Justetc Social Services (non-profit)Jan 31 · 5 min read import pandas as pdimport matplotlib.pyplot as plt%matplotlib inlinefrom __future__ import print_functionfrom ipywidgets import interact, interactive, fixed, interact_manualimport ipywidgets as widgetsprescribing_primary = pd.read_excel(‘../data/prescribing-primary.xls’)prescribing_primary.head() # find all indicatorsprescribing_primary.set_index([‘Indicator’])indicators = pd.Index(prescribing_primary[‘Indicator’]).unique()# find all yearsyears = prescribing_primary[‘Data year’].dropna().unique()indicators[0], years(‘Antibiotics: Proportion of Second Line’, array([‘2015’, ‘2014’, 2015, ‘Not applicable’, 2014], dtype=object))# sort yearsyears = …
Feb 07
patient-safety, Health System Performance, Canada and Others
Justetc Social Services (non-profit)Jan 31 · 5 min read import pandas as pdimport matplotlib.pyplot as plt%matplotlib inlinefrom __future__ import print_functionfrom ipywidgets import interact, interactive, fixed, interact_manualimport ipywidgets as widgetspatient_safety = pd.read_excel(‘../data/patient-safety.xls’)patient_safety.head() # find all indicatorspatient_safety.set_index([‘Indicator’])indicators = pd.Index(patient_safety[‘Indicator’]).unique()# find all yearsyears = patient_safety[‘Data year’].dropna().unique()indicators[0], years(‘Foreign Body Left In’, array([2015, ‘2014–2015’, ‘Not applicable’, 2014], dtype=object))# sort yearsyears = [ aYear …
Feb 07
non_med_determinants_visualizations, Health System Performance, Canada and Others
Justetc Social Services (non-profit)Jan 31 · 5 min read import pandas as pdimport matplotlib.pyplot as plt%matplotlib inlinefrom __future__ import print_functionfrom ipywidgets import interact, interactive, fixed, interact_manualimport ipywidgets as widgetsnon_med_determinants = pd.read_excel(‘../data/non-med-determinants.xls’)non_med_determinants.head() # find all indicatorsnon_med_determinants.set_index([‘Indicator’])indicators = pd.Index(non_med_determinants[‘Indicator’]).unique()# find all yearsyears = non_med_determinants[‘Data year’].dropna().unique()indicators[0], years(‘Alcohol Consumption: Adults’, array([‘2014’, ‘2015’, ‘2013’, 2015, ‘Not applicable’, ‘2016’], dtype=object))# sort yearsyears = [ …
Feb 07
interactive_health_status_visualizations, Health System Performance, Canada and Others
Justetc Social Services (non-profit)Jan 31 · 5 min read import pandas as pdimport matplotlib.pyplot as plt%matplotlib inlinefrom __future__ import print_functionfrom ipywidgets import interact, interactive, fixed, interact_manualimport ipywidgets as widgetshealth_status = pd.read_excel(‘../data/health-status.xls’)health_status.head() # find all indicatorshealth_status.set_index([‘Indicator’])indicators = pd.Index(health_status[‘Indicator’]).unique()# find all yearsyears = health_status[‘Data year’].unique()indicators[0], years[0](‘Cancer Mortality (F)’, ‘2013’)# sort yearsyears = [ int(aYear) for aYear in years if (aYear …
Feb 07
health_status_visualizations, Health System Performance, Canada and Others
Justetc Social Services (non-profit)Jan 31 · 4 min read import pandas as pdimport matplotlib.pyplot as plt%matplotlib inlinefrom __future__ import print_functionfrom ipywidgets import interact, interactive, fixed, interact_manualimport ipywidgets as widgetshealth_status = pd.read_excel(‘../data/health-status.xls’)health_status.head() health_status.set_index([‘Indicator’])#health_status.loc[health_status[‘Cancer Mortality (F)’]]#health_status.index.unique()indicators = pd.Index(health_status[‘Indicator’]).unique()years = health_status[‘Data year’].unique()indicators[0], years[0](‘Cancer Mortality (F)’, ‘2013’)cancer_mortality_2013 = health_status.loc[ (health_status[‘Indicator’] == indicators[0]) & (health_status[‘Data year’] == years[0]) ]cancer_mortality = health_status.loc[ (health_status[‘Indicator’] == …
Feb 07
access_to_care, primary-prescribing, Health System Performance, Canada and Others
Justetc Social Services (non-profit)Jan 31 · 5 min read import pandas as pdimport matplotlib.pyplot as plt%matplotlib inlinefrom __future__ import print_functionfrom ipywidgets import interact, interactive, fixed, interact_manualimport ipywidgets as widgetsaccess_to_care = pd.read_excel(‘../data/access-to-care.xls’)access_to_care.head() # find all indicatorsaccess_to_care.set_index([‘Indicator’])indicators = pd.Index(access_to_care[‘Indicator’]).unique()# find all yearsyears = access_to_care[‘Data year’].dropna().unique()indicators[0], years(‘Inability to Pay for Medical Bills’, array([‘2016’, 2016, ‘Not applicable’, ‘2015’, ‘2013’], dtype=object))# sort yearsyears …
Feb 07
How to use ipywidgets, interactive as used in the project
Justetc Social Services (non-profit)Jan 31 · 1 min read from __future__ import print_functionfrom ipywidgets import interact, interactive, fixed, interact_manualimport ipywidgets as widgetsdef f(x): return xinteract(f, x=10);interactive(children=(IntSlider(value=10, description=’x’, max=30, min=-10), Output()), _dom_classes=(‘widget-…interact(f, x=True);interactive(children=(Checkbox(value=True, description=’x’), Output()), _dom_classes=(‘widget-interact’,))interact(f, x=’Hi there!’);interactive(children=(Text(value=’Hi there!’, description=’x’), Output()), _dom_classes=(‘widget-interact’,))@interact(x=True, y=1.0)def g(x, y): return (x, y)interactive(children=(Checkbox(value=True, description=’x’), FloatSlider(value=1.0, description=’y’, max=3.0, …interact(f, x=[‘apples’,’oranges’]);interactive(children=(Dropdown(description=’x’, options=(‘apples’, ‘oranges’), value=’apples’), Output()), _do…from …
Feb 07
IPywidgets, interactive
Justetc Social Services (non-profit)·Jan 31 from __future__ import print_functionfrom ipywidgets import interact, interactive, fixed, interact_manualimport ipywidgets as widgetsdef f(x): return xinteract(f, x=10);interactive(children=(IntSlider(value=10, description=’x’, max=30, min=-10), Output()), _dom_classes=(‘widget-…interact(f, x=True);interactive(children=(Checkbox(value=True, description=’x’), Output()), _dom_classes=(‘widget-interact’,))interact(f, x=’Hi there!’);interactive(children=(Text(value=’Hi there!’, description=’x’), Output()), _dom_classes=(‘widget-interact’,))@interact(x=True, y=1.0)def g(x, y): return (x, y)interactive(children=(Checkbox(value=True, description=’x’), FloatSlider(value=1.0, description=’y’, max=3.0, …interact(f, x=[‘apples’,’oranges’]);interactive(children=(Dropdown(description=’x’, options=(‘apples’, ‘oranges’), value=’apples’), Output()), _do…from IPython.display …