Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Jan 15, 2024
1 parent fe9a468 commit 90e3e36
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
10 changes: 6 additions & 4 deletions examples/tutorials/01_Param.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,9 @@
"\n",
"data_url = 'https://datasets.holoviz.org/windturbines/v1/windturbines.parq'\n",
"\n",
"df = pn.rx(pd.read_parquet(data_url))\n",
"df = pd.read_parquet(data_url)\n",
"\n",
"dfrx = pn.rx(df)\n",
"\n",
"slider = pn.widgets.IntSlider(start=1, end=10)\n",
"\n",
Expand Down Expand Up @@ -381,7 +383,7 @@
" return np.full_like(s, False)\n",
" return np.where(s == np.nanmax(s.values), props, '')\n",
"\n",
"styled_df = df[cols].sample(nrows).style.apply(highlight_max, props=style.format(color=color), axis=0)\n",
"styled_df = dfrx[cols].sample(nrows).style.apply(highlight_max, props=style.format(color=color), axis=0)\n",
"\n",
"pn.pane.DataFrame(styled_df)"
]
Expand Down Expand Up @@ -443,7 +445,7 @@
" \n",
" page_size = param.Integer(default=10, doc=\"Number of rows per page.\", bounds=(1, 20))\n",
" \n",
"explorer = DataExplorer(data=pd.read_parquet('./windturbines.parq'), page_size=5)"
"explorer = DataExplorer(data=df, page_size=5)"
]
},
{
Expand Down Expand Up @@ -522,7 +524,7 @@
" pn.widgets.Tabulator.from_param(self.param.data, page_size=self.param.page_size, sizing_mode='stretch_width')\n",
" )\n",
" \n",
"DataExplorer(data=pd.read_parquet('https://datasets.holoviz.org/windturbines/v1/windturbines.parq'))"
"DataExplorer(data=df)"
]
},
{
Expand Down
4 changes: 3 additions & 1 deletion examples/tutorials/05_Layouts.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,9 @@
"import hvplot.pandas\n",
"import pandas as pd\n",
"\n",
"df = pn.rx(pd.read_parquet('./windturbines.parq'))\n",
"data_url = 'https://datasets.holoviz.org/windturbines/v1/windturbines.parq'\n",
"\n",
"df = pn.rx(pd.read_parquet(data_url))\n",
"\n",
"CARD_STYLE = \"\"\"\n",
":host {\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/tutorials/06_Structuring_Code.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@
},
"outputs": [],
"source": [
"ds = DataStore(data=pd.read_parquet('./windturbines.parq'), filters=['p_year', 'p_cap', 't_manu'])\n",
"ds = DataStore(data=turbines, filters=['p_year', 'p_cap', 't_manu'])\n",
"\n",
"app = App(data_store=ds, views=[Indicators, Histogram, Table], title='Windturbine Explorer')\n",
"\n",
Expand Down

0 comments on commit 90e3e36

Please sign in to comment.