diff --git a/demo/voila_demo.ipynb b/demo/voila_demo.ipynb index e9164b0..cd0431f 100644 --- a/demo/voila_demo.ipynb +++ b/demo/voila_demo.ipynb @@ -73,6 +73,7 @@ "import warnings\n", "import time\n", "import json\n", + "import re\n", "from IPython import display\n", "# atl03 plotting imports\n", "import numpy as np\n", @@ -334,7 +335,10 @@ " with show_code06_output:\n", " display.clear_output()\n", " print(f'icesat2.init(\"{url_textbox.value}\")')\n", - " print('parms = ', json.dumps(atl06_parms, indent=4), sep='')\n", + " # validate boolean entries to be in title case\n", + " atl06_json = json.dumps(atl06_parms, indent=4)\n", + " atl06_json = re.sub(r'\\b(true|false)', lambda m: m.group(1).title(), atl06_json)\n", + " print('parms = ', atl06_json, sep='')\n", " print('gdf = icesat2.atl06p(parms, asset=\"icesat2\")')\n", " \n", "# link buttons\n", @@ -570,7 +574,10 @@ " with show_code03_output:\n", " display.clear_output()\n", " print(f'icesat2.init(\"{url_textbox.value}\")')\n", - " print('parms = ', json.dumps(atl03_parms, indent=4), sep='')\n", + " # validate boolean entries to be in title case\n", + " atl03_json = json.dumps(atl03_parms, indent=4)\n", + " atl03_json = re.sub(r'\\b(true|false)', lambda m: m.group(1).title(), atl03_json)\n", + " print('parms = ', atl03_json, sep='')\n", " print('gdf = icesat2.atl03sp(parms, asset=\"icesat2\")')\n", " \n", "# install click handler callback\n", @@ -651,7 +658,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.3" + "version": "3.10.6" }, "toc-showtags": false },