nbinteract: Shareable interactive web pages from notebooks
nbinteract: Shareable interactive web pages from notebooks
Sam Lau (UC Berkeley), Caleb Siu (UC Berkeley)
Jupyter widgets provide simple ways to add interactivity into notebooks. However, sharing these interactive notebooks is challenging since potential viewers need to open the notebook and run cells in order to interact with widgets. Although nbconvert can convert notebooks with widgets into HTML files, the widgets in the HTML files lose functionality because browsers typically don’t natively run Python.
The nbinteract Python package converts a notebook with widgets into a standalone HTML page that keeps widget functionality, enabling authors to create interactive web pages using Jupyter notebooks. These web pages can either display the original Python code or hide it to only present interactive elements. When a viewer interacts with a widget, a Binder kernel runs Python code behind the scenes to display the result. Combining widgets with plotting gives authors a function-driven, flexible way to create interactions on the plot’s data. Although matplotlib-based plotting is possible, interactions are laggy because images are too large to send over the network in real time. Nbinteract addresses this issue by supporting a set of plotting functions that generate Javascript-based plots. The reduced data sent through the network enables smooth, real-time interactions.
Sam Lau and Caleb Siu offer an overview of nbinteract and walk you through the steps to publish an interactive web page from a Jupyter notebook. To demonstrate how nbinteract’s set of functionality is particularly useful for creating materials to teach data science, Sam and Caleb share how they have used nbinteract for the online textbook of a popular UC Berkeley data science course. They conclude by opening up the floor to discuss other possible applications and use cases for the library.
Subscribe to O'Reilly on YouTube: http://goo.gl/n3QSYi
Follow O'Reilly on:
Twitter: http://twitter.com/oreillymedia
Facebook: http://facebook.com/OReilly
Instagram: https://www.instagram.com/oreillymedia
LinkedIn: https://www.linkedin.com/company-beta/8459/
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «nbinteract: Shareable interactive web pages from notebooks», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.