Skip to content

Commit

Permalink
Renamed examples into docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathias157 committed Sep 16, 2024
1 parent 72710ef commit c5cc906
Show file tree
Hide file tree
Showing 10 changed files with 329 additions and 21 deletions.
File renamed without changes.
File renamed without changes.
350 changes: 329 additions & 21 deletions examples/PostProcessing.ipynb → docs/PostProcessing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,177 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 1,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"c:\\Users\\mberos\\gitRepos\\pybalmorel\\examples\\files\\MainResults_Example1.gdx\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "3dd833a7b756450099ffa047e9452e55",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"GridBox(children=(Dropdown(description='Table:', layout=Layout(width='80%'), options=('F_CONS_YCRA', 'F_CONS_Y…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "a7ab13dbcf744c6ab4874158fc99e3f6",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Output()"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "8d2f2ec7d8b34c5fa19f1fdc26881efa",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Stack(children=(GridBox(children=(SelectMultiple(description='Scenario', index=(0,), layout=Layout(height='99%…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "a3c01fee0cbd49078bde0fd1ab90efe4",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Output()"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "7f3c74e813ef48c2b41e29f823d3c56e",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"VBox(children=(HBox(children=(Box(children=(Text(value='', description='Title:'), FloatSlider(value=12.0, desc…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "090e62507fd34ecfa758c15444a4a3b6",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Output()"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "1551bbc867ec4d43bfac4412f48dc158",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox()"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "c6243930cb894de9a59d8d5715c811e2",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Output()"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "ed5a4df1c3a049bc94ea94e0b00e9a04",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"VBox(children=(HBox(children=(Box(children=(Button(description='Plot', icon='check', style=ButtonStyle(), tool…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "69ba3d0371ff4038bf7590019b6d141a",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Output()"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "f9fbb3908b8546618463d2d5de81bfd8",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Output()"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"### 0.1 Use development scripts or the package installed from pip\n",
"use_development = True\n",
"if use_development:\n",
" import sys\n",
" import os\n",
" # Adjust the sys.path to include the project root directory\n",
" project_root = os.path.abspath(os.path.join(os.path.dirname(\"__file__\"), '..'))\n",
" if project_root not in sys.path:\n",
" sys.path.insert(0, project_root)\n",
" from src.pybalmorel import MainResults\n",
" from src.pybalmorel.utils import symbol_to_df\n",
"else:\n",
" from pybalmorel import MainResults\n",
" from pybalmorel.utils import symbol_to_df"
"from pybalmorel import MainResults\n",
"\n",
"res = MainResults(files='MainResults_Example1.gdx', paths='files')\n",
"res.interactive_bar_chart()"
]
},
{
Expand All @@ -53,7 +206,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 2,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -300,7 +453,7 @@
"[252 rows x 11 columns]"
]
},
"execution_count": 6,
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -315,7 +468,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 3,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -575,7 +728,7 @@
"[4550 rows x 12 columns]"
]
},
"execution_count": 7,
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -589,9 +742,164 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "2a89837724c542c4b2e174f8490cb972",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"GridBox(children=(Dropdown(description='Table:', layout=Layout(width='80%'), options=('F_CONS_YCRA', 'F_CONS_Y…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "310822ac3e2945d38c8167d66718817b",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Output()"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "886499487ee44448b2a9264f36ae30a2",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Stack(children=(GridBox(children=(SelectMultiple(description='Scenario', index=(0,), layout=Layout(height='99%…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "5eed18fcad6b411da60699fc6689b55f",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Output()"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "cfa775b5667c4def954863d10eaa4b88",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"VBox(children=(HBox(children=(Box(children=(Text(value='', description='Title:'), FloatSlider(value=12.0, desc…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "a0e91bc69c0b4ad498690afd6b276f8d",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Output()"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "eed71e4163164459bb5394e0d6ebe68c",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox()"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "8e2da5dd04494bac823ca12ccdd8e03e",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Output()"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "b08d6d23249446d3abda0212a6e48f27",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"VBox(children=(HBox(children=(Box(children=(Button(description='Plot', icon='check', style=ButtonStyle(), tool…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "98b23d553083416f8658d59cb756cc29",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Output()"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "b7f74d9267d14870bf16db8b2421f94d",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Output()"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"### 1.1.3 Plotting bar charts with an interactive gui\n",
"res.interactive_bar_chart()"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit c5cc906

Please sign in to comment.