How to save a Google Colab Notebook as HTML
by bernt & torsten
I have been doing a lot of work with creating Jupyter notebooks and collaborating with the Google Colab service, Colaboratory or short-form Colab is a free Jupyter notebook environment that requires no setup and runs entirely in the cloud.
With Colab you can write and execute code, save and share your analyses, and access powerful computing resources, all for free from your browser.
I have been looking at ways to include my notebooks in my WordPress site, as a way to show some of the work and help others that getting started. With WordPress you can add HTML code, the obvious choice would have been to save my Colab notebooks as HTML.
Colab at the moment does not have an option to save your Colab notebook to HTML, Jupyter Notebook has an option to ‘Download as’ HTML (or other) format.
I do all my data science work using Google Colab, a notebook is a great way to tell a story and to test out different analytics technics on your dataset. Before you get to the point of doing a dashboard or in my case adding the code functionality into a web app. There is a workaround to the missing feature in Colab to save to HTML. Here it is.
- Save your Colab notebook.
- File > Download .ipynb
- On your terminal:
jupyter nbconvert --to <output format> <filename.ipynb>
or alternatvie jupyter nbconvert
<filename.ipynb>
--to html
For more information on nbconvert
: https://github.com/jupyter/nbconvert
Below is an example of a Jupyter notebook that I have been working on for teaching people how to use the Jupyter notebook.
Why It’s Important to Exercise When You’re Over 60
Many of us find ourselves in a pickle as the years pile up. Once reliable sidekicks, our...
A Poem: The Last Time
You never know when it will be,
The last time you ski down slopes of snow,
A Poem: Time Millionaire
When the morning wakes, still and clear,
No more alarms, no more rush....