Applying PyScript to Data Science Work

By Cheuk Ting Ho

Elevator Pitch

Everyone is talking about PyScirpt, a framework that allows you to run Python in the browser. Wonder how you can use it in your data science work? In this workshop, we will work on how to use PyScript for data visualisation and ML model deployment.

Description

This workshop consists of 3 chapters. In each chapter, by walking through hands-on exercises, we can use PyScirpt to create data visualisations and deploy Sci-Kit learn models, which are some of the most common tasks in data sciences.

Chapter 1 - Python in the browser (~ 1 hour)

In this chapter, we will go through the basics of using PyScript and running Python in browsers. First, we will go through how to start using PyScript: to call in the pyscript.js script, prepare the python environment to run the Python code, and write a “hello world” program in Python.

Chapter 2 - Visualisation with PyScript (~ 1 hours)

With PyScript, fully customisable interactive visualization can be created easily. In this chapter, we will do several exercises, first, we are going to generate a visualization with Python. Then we start adding an interactive user interface and make the visual changes depending on the user input.

Chapter 3 - Deploying ML model (~ 1 hours)

In this chapter, we will use a very simple machine learning example to try deploying a trained model with PyScript to the front end. Through the exercise, we will create a user interface that can accept input, pass it to the trained model that we loaded in via PyScript and provide an output back to the web page.

Prerequisites

We expect no prior knowledge of PyScript, however, we expect participants are familiar with using Python and some data science libraries like Pandas, SciKit-learn and visualization libraries like Matplotlib.

Who is the workshop for

This workshop is for Pythonistas or Data Scientists who need to deploy data science projects or present data science findings. They may be interested in learning PyScript and seeing if it can help them with their work.