Skip to content

Commit

Permalink
Added nbconvert report generation example
Browse files Browse the repository at this point in the history
  • Loading branch information
jlstevens committed May 30, 2018
1 parent 054d941 commit 49912a8
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,17 @@
"PARAM_JSON_INIT='{\"rain_intensity\":42, \"rain_duration\":50}' jupyter notebook GSSHA_Workflow_Batched_Example1.ipynb\n",
"```\n",
"\n",
"You can also generate a report HTML file using ``nbconvert`` as follows:\n",
"\n",
"```bash\n",
"PARAM_JSON_INIT='{\"rain_intensity\":25, \"rain_duration\":60}' jupyter nbconvert --execute GSSHA_Workflow_Batched_Example1.ipynb --output report1.html\n",
"```\n",
"\n",
"This will set the ``rain_intensity`` and ``rain_duration`` values to ``42`` and ``50`` respectively from the default values of ``24`` and ``60``.\n",
"\n",
"The ``PARAM_JSON_INIT`` environment variable can be used this way to set the notebook parameters in other contexts (e.g using nbconvert to execute the notebook and save it out to HTML). In the next notebook, this approach for parameterizing notebooks is made more user friendly."
"The ``PARAM_JSON_INIT`` variable can be used this way to set the notebook parameters in any context where the environment variables are available in the execution context of the notebook. One major limitation of this approach is that setting environment variables on Windows requires a different syntax.\n",
"\n",
"In the next notebook, this approach for parameterizing notebooks is made more user friendly and generalized to work on Windows."
]
},
{
Expand Down

0 comments on commit 49912a8

Please sign in to comment.