Skip to content

Commit

Permalink
update nemseer examples with matplotlib styling
Browse files Browse the repository at this point in the history
  • Loading branch information
prakaa committed Jul 28, 2023
1 parent 2ca339c commit 137e37f
Show file tree
Hide file tree
Showing 23 changed files with 371 additions and 551 deletions.
65 changes: 4 additions & 61 deletions docs/source/_static/NSW1_abs_price_error_2021.html

Large diffs are not rendered by default.

65 changes: 4 additions & 61 deletions docs/source/_static/QLD1_abs_price_error_2021.html

Large diffs are not rendered by default.

65 changes: 4 additions & 61 deletions docs/source/_static/SA1_abs_price_error_2021.html

Large diffs are not rendered by default.

65 changes: 4 additions & 61 deletions docs/source/_static/TAS1_abs_price_error_2021.html

Large diffs are not rendered by default.

65 changes: 4 additions & 61 deletions docs/source/_static/VIC1_abs_price_error_2021.html

Large diffs are not rendered by default.

65 changes: 4 additions & 61 deletions docs/source/_static/demand_cov.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/source/_static/p5min_error_2021_ahead_time_hists.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/source/_static/p5min_error_2021_tod_percentile.html

Large diffs are not rendered by default.

Binary file modified docs/source/_static/p5min_error_2021_tod_percentile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/source/_static/pd_error_2021_ahead_samples.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/source/_static/pd_error_2021_da_dists.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

65 changes: 4 additions & 61 deletions docs/source/_static/price_cov.html

Large diffs are not rendered by default.

74 changes: 33 additions & 41 deletions docs/source/examples/p5min_demand_forecast_error_2021.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"source": [
"# standard libraries\n",
"from datetime import datetime, timedelta\n",
"from dateutil.relativedelta import relativedelta\n",
"from pathlib import Path\n",
"import multiprocessing as mp\n",
"\n",
Expand Down Expand Up @@ -71,7 +70,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 2,
"metadata": {
"tags": [
"hide-cell"
Expand All @@ -81,7 +80,7 @@
"source": [
"nemseer_template = dict(\n",
" layout=go.Layout(\n",
" font_family=\"Source Sans Pro\",\n",
" font_family=\"Source Sans 3\",\n",
" title_font_size=24,\n",
" title_x=0.05,\n",
" plot_bgcolor=\"#f0f0f0\",\n",
Expand Down Expand Up @@ -206,7 +205,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -317,7 +316,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -446,9 +445,22 @@
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [],
"execution_count": 8,
"metadata": {
"tags": [
"remove-output"
]
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/abi/version_control/NEMSEER/.venv/lib/python3.11/site-packages/nemosis/data_fetch_methods.py:781: UserWarning: Could not infer format, so each element will be parsed individually, falling back to `dateutil`. To ensure parsing is consistent and as-expected, please specify a format.\n",
" col_new = _pd.to_datetime(series)\n"
]
}
],
"source": [
"forecast_error = calculate_p5min_demand_forecast_error_vectorised(\n",
" analysis_start, analysis_end\n",
Expand All @@ -472,7 +484,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -507,7 +519,7 @@
},
{
"cell_type": "code",
"execution_count": 23,
"execution_count": 10,
"metadata": {
"scrolled": true
},
Expand Down Expand Up @@ -542,7 +554,7 @@
},
{
"cell_type": "code",
"execution_count": 24,
"execution_count": 11,
"metadata": {
"tags": [
"remove-cell"
Expand Down Expand Up @@ -581,28 +593,13 @@
},
{
"cell_type": "code",
"execution_count": 25,
"execution_count": 12,
"metadata": {
"tags": [
"remove-output"
]
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/tmp/ipykernel_274950/2372743404.py:4: SettingWithCopyWarning:\n",
"\n",
"\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: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
"\n"
]
}
],
"outputs": [],
"source": [
"error_excluding_real_time = forecast_error[\n",
" forecast_error[\"ahead_time\"].dt.seconds > 300\n",
Expand All @@ -614,7 +611,7 @@
},
{
"cell_type": "code",
"execution_count": 26,
"execution_count": 13,
"metadata": {
"scrolled": true
},
Expand All @@ -633,7 +630,7 @@
},
{
"cell_type": "code",
"execution_count": 27,
"execution_count": 14,
"metadata": {
"tags": [
"remove-cell"
Expand Down Expand Up @@ -670,7 +667,7 @@
},
{
"cell_type": "code",
"execution_count": 28,
"execution_count": 15,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -696,7 +693,7 @@
},
{
"cell_type": "code",
"execution_count": 29,
"execution_count": 16,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -729,7 +726,7 @@
},
{
"cell_type": "code",
"execution_count": 30,
"execution_count": 17,
"metadata": {
"tags": [
"remove-cell"
Expand All @@ -755,9 +752,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "nemseer",
"display_name": ".venv",
"language": "python",
"name": "nemseer"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -769,15 +766,10 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.6"
"version": "3.11.4"
},
"mystnb": {
"execution_mode": "off"
},
"vscode": {
"interpreter": {
"hash": "576fc7d7a7b34496c6e4e4b9ac6c058d3cc09d324fa720081ac27e023c8ef135"
}
}
},
"nbformat": 4,
Expand Down
31 changes: 20 additions & 11 deletions docs/source/examples/pd_demand_forecast_error_2021.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"source": [
"nemseer_template = dict(\n",
" layout=go.Layout(\n",
" font_family=\"Source Sans Pro\",\n",
" font_family=\"Source Sans 3\",\n",
" title_font_size=24,\n",
" title_x=0.05,\n",
" plot_bgcolor=\"#f0f0f0\",\n",
Expand Down Expand Up @@ -435,8 +435,21 @@
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [],
"metadata": {
"tags": [
"remove-output"
]
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/abi/version_control/NEMSEER/.venv/lib/python3.11/site-packages/nemosis/data_fetch_methods.py:781: UserWarning: Could not infer format, so each element will be parsed individually, falling back to `dateutil`. To ensure parsing is consistent and as-expected, please specify a format.\n",
" col_new = _pd.to_datetime(series)\n"
]
}
],
"source": [
"forecast_error = calculate_predispatch_demand_forecast_error_vectorised(\n",
" analysis_start, analysis_end\n",
Expand Down Expand Up @@ -794,6 +807,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"```{raw} html\n",
"---\n",
"file: ../_static/pd_error_2021_da_dists.html\n",
Expand All @@ -804,9 +818,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "nemseer",
"display_name": ".venv",
"language": "python",
"name": "nemseer"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -818,15 +832,10 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.6"
"version": "3.11.4"
},
"mystnb": {
"execution_mode": "off"
},
"vscode": {
"interpreter": {
"hash": "3d87edaa96a2b6f20f72be58868756e9fd14c277bec7729a5632a59d6b45b0d7"
}
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 137e37f

Please sign in to comment.