Book Image

Getting Started with Streamlit for Data Science

By : Tyler Richards
Book Image

Getting Started with Streamlit for Data Science

By: Tyler Richards

Overview of this book

Streamlit shortens the development time for the creation of data-focused web applications, allowing data scientists to create web app prototypes using Python in hours instead of days. Getting Started with Streamlit for Data Science takes a hands-on approach to helping you learn the tips and tricks that will have you up and running with Streamlit in no time. You'll start with the fundamentals of Streamlit by creating a basic app and gradually build on the foundation by producing high-quality graphics with data visualization and testing machine learning models. As you advance through the chapters, you’ll walk through practical examples of both personal data projects and work-related data-focused web applications, and get to grips with more challenging topics such as using Streamlit Components, beautifying your apps, and quick deployment of your new apps. By the end of this book, you’ll be able to create dynamic web apps in Streamlit quickly and effortlessly using the power of Python.
Table of Contents (17 chapters)
Section 1: Creating Basic Streamlit Applications
Section 2: Advanced Streamlit Applications
Section 3: Streamlit Use Cases

Making an MVP

Looking at our data, we can start by asking a basic question: what are the most interesting questions I can answer with this data? After looking at the data and thinking about what information I would want from my Goodreads reading history, here are a few questions that I have thought of:

  • How many books do I read each year?
  • How long does it take for me to finish a book that I have started?
  • How long are the books that I have read?
  • How old are the books that I have read? 
  • How do I rate books compared to other Goodreads users?

We can take these questions, figure out how to modify our data to visualize them well, and then make the first go at our product by printing out all of the graphs. 

How many books do I read each year?

For the first question about books read per year, we have the Date Read column with the data presented in the format of yyyy/mm/dd. The following code block will do the following:

  • Convert our column...