13 Introduction to web development for data science

 

This chapter covers

  • How web development helps data scientists
  • Creating a web-based data science app
  • Deploying a Flask app

When you read the chapter title, you might be wondering what web development has to do with data science. Web development involves building websites and webpages for other users, potentially on a large scale. Knowing the basics of web development can be a useful tool for data scientists, which is why we’ve chosen to cover it as the final chapter of this book. Here are a few reasons why web development can be useful for data scientists:

  • Creating a web app to collect data. For example, for various data science problems, you may need to perform manual labeling, and creating a simplified web app for others to use to label data or observations could be very helpful
  • Developing a web app that lets users explore a dataset. Applications like this can be helpful when you want to share data or visualizations with users that might not know how to code
  • Creating a web-based dashboard that lets users monitor key metrics. This type of application can be critical when putting models into production so that users can make sure there are no critical issues regarding a model’s performance

Now, let’s delve into web development with a hands-on Python example, and a focus on applying the knowledge we gain toward data science applications.

13.1 Introducing Flask for web development

13.1.1 Getting started with Flask

13.2 Creating a Flask application

13.2.1 Overview of HTML

13.3 Creating a multi-page web app

13.3.1 A skeleton app

13.3.2 HTML templates

13.3.3 The main page template

13.3.4 The core metrics template

13.3.5 Data view template

13.3.6 Machine learning app template

13.4 Deploying a Flask app

13.5 Practice on your own

13.6 Summary