diff --git a/notebooks/ccg-opioids-change-detection-analysis.ipynb b/notebooks/ccg-opioids-change-detection-analysis.ipynb
index b0d78c8..ba98c8c 100644
--- a/notebooks/ccg-opioids-change-detection-analysis.ipynb
+++ b/notebooks/ccg-opioids-change-detection-analysis.ipynb
@@ -1,5 +1,29 @@
{
"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Identifying successful interventions (CCGs) in opioid prescribing data"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "This notebook contains methodology and results of an analysis of opioid prescribing data. The CCGs with the ten largest reductions in opioid prescribing are shown here, but it is also possible to access the most recent (last five years) results for any CCG or practice via the [OpenPrescribing.net](OpenPrescribing.net) website.\n",
+ "\n",
+ "To find an organisation’s data for any of the three opioid measures use in this analysis, navigate to the specific measure’s landing page. For the measures described in this notebook, these are:\n",
+ "\n",
+ "- [Total oral morphine equivalence](https://openprescribing.net/measure/opioidome/)\n",
+ "- [High dose opioids as percentage regular opioids](https://openprescribing.net/measure/opioidspercent/)\n",
+ "- [High dose opioids per 1000 patients](https://openprescribing.net/measure/opioidper1000/)\n",
+ "\n",
+ "Decile plots for all current CCGs are available on the measure landing page; specific CCGs can be identified via a text search in your browser. To view similar decile plots for a practice, click the “Split the measure into chargers for individual practice” link under the parent CCG.\n",
+ "\n",
+ "Alternatively, summary results can be obtained for more than one organisation at once by selecting “View this measure on the analyse page” (under “Explore”) on the measure’s landing page (10–12); this will launch a new analysis, pre-loaded with the relevant drugs or BNF sections. Any number of organisations (CCGs or practices) can then be selected by typing code or text into the “highlighting” box; clicking on the “Show me the data!” button will launch this analysis and display the results as a histogram, time series or as a choropleth map. All plots and raw data are available for download."
+ ]
+ },
{
"cell_type": "markdown",
"metadata": {},
@@ -9,7 +33,7 @@
},
{
"cell_type": "code",
- "execution_count": 212,
+ "execution_count": 233,
"metadata": {},
"outputs": [],
"source": [
@@ -30,7 +54,7 @@
},
{
"cell_type": "code",
- "execution_count": 213,
+ "execution_count": 234,
"metadata": {},
"outputs": [
{
@@ -63,7 +87,7 @@
},
{
"cell_type": "code",
- "execution_count": 214,
+ "execution_count": 235,
"metadata": {},
"outputs": [
{
@@ -233,7 +257,7 @@
" 00L NaN NaN "
]
},
- "execution_count": 214,
+ "execution_count": 235,
"metadata": {},
"output_type": "execute_result"
}
@@ -265,7 +289,7 @@
},
{
"cell_type": "code",
- "execution_count": 215,
+ "execution_count": 236,
"metadata": {},
"outputs": [],
"source": [
@@ -276,7 +300,7 @@
},
{
"cell_type": "code",
- "execution_count": 222,
+ "execution_count": 237,
"metadata": {},
"outputs": [
{
@@ -426,7 +450,7 @@
},
{
"cell_type": "code",
- "execution_count": 217,
+ "execution_count": 238,
"metadata": {},
"outputs": [],
"source": [
@@ -437,7 +461,7 @@
},
{
"cell_type": "code",
- "execution_count": 218,
+ "execution_count": 239,
"metadata": {},
"outputs": [
{
@@ -563,9 +587,8 @@
"NHS DARLINGTON CCG "
]
},
- "execution_count": 218,
"metadata": {},
- "output_type": "execute_result"
+ "output_type": "display_data"
}
],
"source": [
@@ -588,7 +611,7 @@
},
{
"cell_type": "code",
- "execution_count": 219,
+ "execution_count": 240,
"metadata": {},
"outputs": [],
"source": [
@@ -599,7 +622,7 @@
},
{
"cell_type": "code",
- "execution_count": 220,
+ "execution_count": 241,
"metadata": {},
"outputs": [
{
@@ -725,9 +748,8 @@
"NHS BLACKBURN WITH DARWEN CCG "
]
},
- "execution_count": 220,
"metadata": {},
- "output_type": "execute_result"
+ "output_type": "display_data"
}
],
"source": [
@@ -745,32 +767,32 @@
},
{
"cell_type": "code",
- "execution_count": 221,
+ "execution_count": 242,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
- ":14: SettingWithCopyWarning: \n",
+ ":14: SettingWithCopyWarning: \n",
"A value is trying to be set on a copy of a slice from a DataFrame.\n",
"Try using .loc[row_indexer,col_indexer] = value instead\n",
"\n",
"See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
" CCG_decreases_summary_tosave['median'] = (100 * CCG_decreases_summary_tosave['median']).round(1)\n",
- ":15: SettingWithCopyWarning: \n",
+ ":15: SettingWithCopyWarning: \n",
"A value is trying to be set on a copy of a slice from a DataFrame.\n",
"Try using .loc[row_indexer,col_indexer] = value instead\n",
"\n",
"See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
" CCG_decreases_summary_tosave['IQR'] = (100 * CCG_decreases_summary_tosave['IQR']).round(1)\n",
- ":16: SettingWithCopyWarning: \n",
+ ":16: SettingWithCopyWarning: \n",
"A value is trying to be set on a copy of a slice from a DataFrame.\n",
"Try using .loc[row_indexer,col_indexer] = value instead\n",
"\n",
"See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
" CCG_decreases_summary_tosave['min'] = (100 * CCG_decreases_summary_tosave['min']).round(1)\n",
- ":17: SettingWithCopyWarning: \n",
+ ":17: SettingWithCopyWarning: \n",
"A value is trying to be set on a copy of a slice from a DataFrame.\n",
"Try using .loc[row_indexer,col_indexer] = value instead\n",
"\n",
@@ -842,9 +864,8 @@
"Total oral morphine equivalence 32.8 "
]
},
- "execution_count": 221,
"metadata": {},
- "output_type": "execute_result"
+ "output_type": "display_data"
}
],
"source": [
diff --git a/notebooks/diffable_python/ccg-opioids-change-detection-analysis.py b/notebooks/diffable_python/ccg-opioids-change-detection-analysis.py
index f7790bb..ad962f9 100644
--- a/notebooks/diffable_python/ccg-opioids-change-detection-analysis.py
+++ b/notebooks/diffable_python/ccg-opioids-change-detection-analysis.py
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
# ---
# jupyter:
# jupytext:
@@ -14,6 +15,20 @@
# name: python3
# ---
+# # Identifying successful interventions (CCGs) in opioid prescribing data
+
+# This notebook contains methodology and results of an analysis of opioid prescribing data. The CCGs with the ten largest reductions in opioid prescribing are shown here, but it is also possible to access the most recent (last five years) results for any CCG or practice via the [OpenPrescribing.net](OpenPrescribing.net) website.
+#
+# To find an organisation’s data for any of the three opioid measures use in this analysis, navigate to the specific measure’s landing page. For the measures described in this notebook, these are:
+#
+# - [Total oral morphine equivalence](https://openprescribing.net/measure/opioidome/)
+# - [High dose opioids as percentage regular opioids](https://openprescribing.net/measure/opioidspercent/)
+# - [High dose opioids per 1000 patients](https://openprescribing.net/measure/opioidper1000/)
+#
+# Decile plots for all current CCGs are available on the measure landing page; specific CCGs can be identified via a text search in your browser. To view similar decile plots for a practice, click the “Split the measure into chargers for individual practice” link under the parent CCG.
+#
+# Alternatively, summary results can be obtained for more than one organisation at once by selecting “View this measure on the analyse page” (under “Explore”) on the measure’s landing page (10–12); this will launch a new analysis, pre-loaded with the relevant drugs or BNF sections. Any number of organisations (CCGs or practices) can then be selected by typing code or text into the “highlighting” box; clicking on the “Show me the data!” button will launch this analysis and display the results as a histogram, time series or as a choropleth map. All plots and raw data are available for download.
+
# ## Import libraries required for analysis
# NBVAL_IGNORE_OUTPUT
diff --git a/notebooks/diffable_python/practice-opioids-change-detection-analysis.py b/notebooks/diffable_python/practice-opioids-change-detection-analysis.py
index 52b26ec..92b5be7 100644
--- a/notebooks/diffable_python/practice-opioids-change-detection-analysis.py
+++ b/notebooks/diffable_python/practice-opioids-change-detection-analysis.py
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
# ---
# jupyter:
# jupytext:
@@ -14,6 +15,20 @@
# name: python3
# ---
+# # Identifying successful interventions (practices) in opioid prescribing data
+
+# This notebook contains methodology and results of an analysis of opioid prescribing data. The practices with the ten largest reductions in opioid prescribing are shown here, but it is also possible to access the most recent (last five years) results for any practice or CCG via the [OpenPrescribing.net](OpenPrescribing.net) website.
+#
+# To find an organisation’s data for any of the three opioid measures use in this analysis, navigate to the specific measure’s landing page. For the measures described in this notebook, these are:
+#
+# - [Total oral morphine equivalence](https://openprescribing.net/measure/opioidome/)
+# - [High dose opioids as percentage regular opioids](https://openprescribing.net/measure/opioidspercent/)
+# - [High dose opioids per 1000 patients](https://openprescribing.net/measure/opioidper1000/)
+#
+# Decile plots for all current CCGs are available on the measure landing page; specific CCGs can be identified via a text search in your browser. To view similar decile plots for a practice, click the “Split the measure into chargers for individual practice” link under the parent CCG.
+#
+# Alternatively, summary results can be obtained for more than one organisation at once by selecting “View this measure on the analyse page” (under “Explore”) on the measure’s landing page (10–12); this will launch a new analysis, pre-loaded with the relevant drugs or BNF sections. Any number of organisations (CCGs or practices) can then be selected by typing code or text into the “highlighting” box; clicking on the “Show me the data!” button will launch this analysis and display the results as a histogram, time series or as a choropleth map. All plots and raw data are available for download.
+
# ## Import libraries required for analysis
# + scrolled=true
@@ -95,7 +110,7 @@
'practice_data_opioid/practice_data_opioidome',
'practice_data_opioidome')
-OME_table
+display( OME_table )
# ## High dose opioids as percentage regular opioids
@@ -105,7 +120,7 @@
'practice_data_opioid/practice_data_opioidspercent',
'practice_data_opioidspercent')
-highperc_table
+display( highperc_table )
# ## High dose opioids per 1000 patients
@@ -115,7 +130,7 @@
'practice_data_opioid/practice_data_opioidper1000',
'practice_data_opioidper1000')
-high1000_table
+display( high1000_table )
# ## Summary statistics
#
@@ -139,7 +154,8 @@
practice_decreases_summary_tosave['IQR'] = (100 * practice_decreases_summary_tosave['IQR']).round(1)
practice_decreases_summary_tosave['min'] = (100 * practice_decreases_summary_tosave['min']).round(1)
practice_decreases_summary_tosave['max'] = (100 * practice_decreases_summary_tosave['max']).round(1)
-practice_decreases_summary_tosave
+
+display( practice_decreases_summary_tosave )
# -
diff --git a/notebooks/practice-opioids-change-detection-analysis.ipynb b/notebooks/practice-opioids-change-detection-analysis.ipynb
index ab342a6..f4880e7 100644
--- a/notebooks/practice-opioids-change-detection-analysis.ipynb
+++ b/notebooks/practice-opioids-change-detection-analysis.ipynb
@@ -1,5 +1,29 @@
{
"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Identifying successful interventions (practices) in opioid prescribing data"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "This notebook contains methodology and results of an analysis of opioid prescribing data. The practices with the ten largest reductions in opioid prescribing are shown here, but it is also possible to access the most recent (last five years) results for any practice or CCG via the [OpenPrescribing.net](OpenPrescribing.net) website.\n",
+ "\n",
+ "To find an organisation’s data for any of the three opioid measures use in this analysis, navigate to the specific measure’s landing page. For the measures described in this notebook, these are:\n",
+ "\n",
+ "- [Total oral morphine equivalence](https://openprescribing.net/measure/opioidome/)\n",
+ "- [High dose opioids as percentage regular opioids](https://openprescribing.net/measure/opioidspercent/)\n",
+ "- [High dose opioids per 1000 patients](https://openprescribing.net/measure/opioidper1000/)\n",
+ "\n",
+ "Decile plots for all current CCGs are available on the measure landing page; specific CCGs can be identified via a text search in your browser. To view similar decile plots for a practice, click the “Split the measure into chargers for individual practice” link under the parent CCG.\n",
+ "\n",
+ "Alternatively, summary results can be obtained for more than one organisation at once by selecting “View this measure on the analyse page” (under “Explore”) on the measure’s landing page (10–12); this will launch a new analysis, pre-loaded with the relevant drugs or BNF sections. Any number of organisations (CCGs or practices) can then be selected by typing code or text into the “highlighting” box; clicking on the “Show me the data!” button will launch this analysis and display the results as a histogram, time series or as a choropleth map. All plots and raw data are available for download."
+ ]
+ },
{
"cell_type": "markdown",
"metadata": {},
@@ -9,7 +33,7 @@
},
{
"cell_type": "code",
- "execution_count": 136,
+ "execution_count": 162,
"metadata": {
"scrolled": true
},
@@ -34,7 +58,7 @@
},
{
"cell_type": "code",
- "execution_count": 137,
+ "execution_count": 163,
"metadata": {},
"outputs": [
{
@@ -66,7 +90,7 @@
},
{
"cell_type": "code",
- "execution_count": 138,
+ "execution_count": 164,
"metadata": {},
"outputs": [
{
@@ -244,7 +268,7 @@
" A81006 NaN "
]
},
- "execution_count": 138,
+ "execution_count": 164,
"metadata": {},
"output_type": "execute_result"
}
@@ -263,7 +287,7 @@
},
{
"cell_type": "code",
- "execution_count": 139,
+ "execution_count": 165,
"metadata": {},
"outputs": [
{
@@ -309,7 +333,7 @@
"4 A99960"
]
},
- "execution_count": 139,
+ "execution_count": 165,
"metadata": {},
"output_type": "execute_result"
}
@@ -336,7 +360,7 @@
},
{
"cell_type": "code",
- "execution_count": 140,
+ "execution_count": 166,
"metadata": {},
"outputs": [
{
@@ -382,7 +406,7 @@
"4 Y02926 "
]
},
- "execution_count": 140,
+ "execution_count": 166,
"metadata": {},
"output_type": "execute_result"
}
@@ -409,7 +433,7 @@
},
{
"cell_type": "code",
- "execution_count": 141,
+ "execution_count": 167,
"metadata": {},
"outputs": [
{
@@ -596,7 +620,7 @@
" A81006 NaN "
]
},
- "execution_count": 141,
+ "execution_count": 167,
"metadata": {},
"output_type": "execute_result"
}
@@ -634,7 +658,7 @@
},
{
"cell_type": "code",
- "execution_count": 142,
+ "execution_count": 168,
"metadata": {},
"outputs": [],
"source": [
@@ -645,7 +669,7 @@
},
{
"cell_type": "code",
- "execution_count": 143,
+ "execution_count": 169,
"metadata": {},
"outputs": [
{
@@ -771,13 +795,12 @@
"BURNLEY GROUP PRACTICE "
]
},
- "execution_count": 143,
"metadata": {},
- "output_type": "execute_result"
+ "output_type": "display_data"
}
],
"source": [
- "OME_table"
+ "display( OME_table )"
]
},
{
@@ -796,7 +819,7 @@
},
{
"cell_type": "code",
- "execution_count": 144,
+ "execution_count": 170,
"metadata": {},
"outputs": [],
"source": [
@@ -807,7 +830,7 @@
},
{
"cell_type": "code",
- "execution_count": 145,
+ "execution_count": 171,
"metadata": {},
"outputs": [
{
@@ -933,13 +956,12 @@
"KINCORA DOCTORS SURGERY "
]
},
- "execution_count": 145,
"metadata": {},
- "output_type": "execute_result"
+ "output_type": "display_data"
}
],
"source": [
- "highperc_table"
+ "display( highperc_table )"
]
},
{
@@ -958,7 +980,7 @@
},
{
"cell_type": "code",
- "execution_count": 146,
+ "execution_count": 172,
"metadata": {},
"outputs": [],
"source": [
@@ -969,7 +991,7 @@
},
{
"cell_type": "code",
- "execution_count": 147,
+ "execution_count": 173,
"metadata": {},
"outputs": [
{
@@ -1095,13 +1117,12 @@
"NUFFIELD HOUSE HEALTH CENTRE "
]
},
- "execution_count": 147,
"metadata": {},
- "output_type": "execute_result"
+ "output_type": "display_data"
}
],
"source": [
- "high1000_table"
+ "display( high1000_table )"
]
},
{
@@ -1115,32 +1136,32 @@
},
{
"cell_type": "code",
- "execution_count": 148,
+ "execution_count": 174,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
- ":14: SettingWithCopyWarning: \n",
+ ":14: SettingWithCopyWarning: \n",
"A value is trying to be set on a copy of a slice from a DataFrame.\n",
"Try using .loc[row_indexer,col_indexer] = value instead\n",
"\n",
"See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
" practice_decreases_summary_tosave['median'] = (100 * practice_decreases_summary_tosave['median']).round(1)\n",
- ":15: SettingWithCopyWarning: \n",
+ ":15: SettingWithCopyWarning: \n",
"A value is trying to be set on a copy of a slice from a DataFrame.\n",
"Try using .loc[row_indexer,col_indexer] = value instead\n",
"\n",
"See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
" practice_decreases_summary_tosave['IQR'] = (100 * practice_decreases_summary_tosave['IQR']).round(1)\n",
- ":16: SettingWithCopyWarning: \n",
+ ":16: SettingWithCopyWarning: \n",
"A value is trying to be set on a copy of a slice from a DataFrame.\n",
"Try using .loc[row_indexer,col_indexer] = value instead\n",
"\n",
"See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
" practice_decreases_summary_tosave['min'] = (100 * practice_decreases_summary_tosave['min']).round(1)\n",
- ":17: SettingWithCopyWarning: \n",
+ ":17: SettingWithCopyWarning: \n",
"A value is trying to be set on a copy of a slice from a DataFrame.\n",
"Try using .loc[row_indexer,col_indexer] = value instead\n",
"\n",
@@ -1212,9 +1233,8 @@
"Total oral morphine equivalence 99.1 "
]
},
- "execution_count": 148,
"metadata": {},
- "output_type": "execute_result"
+ "output_type": "display_data"
}
],
"source": [
@@ -1235,7 +1255,8 @@
"practice_decreases_summary_tosave['IQR'] = (100 * practice_decreases_summary_tosave['IQR']).round(1)\n",
"practice_decreases_summary_tosave['min'] = (100 * practice_decreases_summary_tosave['min']).round(1)\n",
"practice_decreases_summary_tosave['max'] = (100 * practice_decreases_summary_tosave['max']).round(1)\n",
- "practice_decreases_summary_tosave"
+ "\n",
+ "display( practice_decreases_summary_tosave )"
]
},
{