Getting Started with Streamlit for Data Science
eBook - ePub

Getting Started with Streamlit for Data Science

Tyler Richards

Compartir libro
  1. 282 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

Getting Started with Streamlit for Data Science

Tyler Richards

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

Create, deploy, and test your Python applications, analyses, and models with ease using Streamlit

Key Features

  • Learn how to showcase machine learning models in a Streamlit application effectively and efficiently
  • Become an expert Streamlit creator by getting hands-on with complex application creation
  • Discover how Streamlit enables you to create and deploy apps effortlessly

Book Description

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.

What you will learn

  • Set up your first development environment and create a basic Streamlit app from scratch
  • Explore methods for uploading, downloading, and manipulating data in Streamlit apps
  • Create dynamic visualizations in Streamlit using built-in and imported Python libraries
  • Discover strategies for creating and deploying machine learning models in Streamlit
  • Use Streamlit sharing for one-click deployment
  • Beautify Streamlit apps using themes, Streamlit Components, and Streamlit sidebar
  • Implement best practices for prototyping your data science work with Streamlit

Who this book is for

This book is for data scientists and machine learning enthusiasts who want to create web apps using Streamlit. Whether you're a junior data scientist looking to deploy your first machine learning project in Python to improve your resume or a senior data scientist who wants to use Streamlit to make convincing and dynamic data analyses, this book will help you get there! Prior knowledge of Python programming will assist with understanding the concepts covered.

]]>

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Getting Started with Streamlit for Data Science un PDF/ePUB en línea?
Sí, puedes acceder a Getting Started with Streamlit for Data Science de Tyler Richards en formato PDF o ePUB, así como a otros libros populares de Computer Science y Data Processing. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2021
ISBN
9781800563209

Section 1: Creating Basic Streamlit Applications

This section will introduce you to the basics of Streamlit applications, data visualization in Streamlit, how to deploy applications, and how to implement models in a Streamlit application.
The following chapters are covered in this section:
  • Chapter 1, An Introduction to Streamlit
  • Chapter 2, Uploading, Downloading, and Manipulating Data
  • Chapter 3, Data Visualization
  • Chapter 4, Using Machine Learning with Streamlit
  • Chapter 5, Deploying Streamlit with Streamlit Sharing

Chapter 1: An Introduction to Streamlit

Streamlit is a web application framework that helps you build and develop Python-based web applications that can be used to share analytics results, build complex interactive experiences, and illustrate new machine learning models. On top of that, developing and deploying Streamlit apps is incredibly fast and flexible, often turning application development time from days into hours.
In this chapter, we start out with the Streamlit basics. We will learn how to download and run demo Streamlit apps, how to edit demo apps using our own text editor, how to organize our Streamlit apps, and finally, how to make our very own. Then, we will explore the basics of data visualization in Streamlit. We will learn how to accept some initial user input, and then add some finishing touches to our own apps with text. At the end of this chapter, you should be comfortable starting to make your own Streamlit applications!
In particular, we will cover the following topics:
  • Why Streamlit?
  • Installing Streamlit
  • Organizing Streamlit apps
  • Streamlit plotting demo
  • Making an app from scratch
Before we begin, we will start with the technical requirements to make sure we have everything we need to get started.

Technical requirements

Here are the installations and setup required for this chapter:
  • The requirements for this book are to have Python 3.7 (or later) downloaded (https://www.python.org/downloads/), and have a text editor to edit Python files in. Any text editor will do. I use Sublime (https://www.sublimetext.com/3).
  • Some sections of this book use GitHub, and a GitHub account is recommended (https://github.com/join). Understanding how to use Git is not necessary for this book but is always useful. If you want to get started, this link has a useful tutorial: https://guides.github.com/activities/hello-world/.
  • A basic understanding of Python is also very useful for this book. If you are not there yet, feel free to spend some time getting to know Python better using this tutorial (https://docs.python.org/3/tutorial/) or any other of the freely and readily available tutorials out there, and come back here when you are ready. We also need to have the Streamlit library installed, which we will do and test in a later section called Installing Streamlit.

Why Streamlit?

Data scientists have become an increasingly valuable resource for companies and nonprofits over the course of the past decade. They help make data-driven decisions, make processes more efficient, and implement machine learning models to improve these decisions at a repeatable scale. One pain point for data scientists is in the process just after they have found a new insight or made a new model. What is the best way to show a dynamic result, a new model, or a complicated piece of analytics to a data scientist's colleagues? They can send a static visualization, which works in some cases but fails for complicated analyses that build on each other or on anything that requires user input. They can create a Word document (or export their Jupyter notebook as a document) that combines text and visualizations, which also doesn't work for user input and is harder to reproduce. Another option is to build out an entire web application from scratch using a framework such as Flask or Django, and then figure out how to deploy the entire app in AWS or another cloud provider. None of these options really work that well. Many are slow, don't take user input, or are suboptimal for informing the decision-making process so fundamental to data science.
Enter Streamlit. Streamlit is all about speed and interaction. It is a web application framework that helps you build and develop Python web applications. It has built-in and convenient methods for taking in user input, graphing using the most popular and powerful Python graphing libraries, and quickly deploying graphs to a web application.
I have spent the past year building Streamlit apps of all different flavors, from data projects for my personal portfolio to building quick applications for data science take-home problems, to even building mini-apps for repeatable analysis at work. I truly believe that Streamlit could be as valuable to you and your work as it has been to mine and wrote this to bring you quickly up to speed so you can accelerate your learning curve and get to building web applications in minutes and hours instead of days. If this is for you, read on! We will work in three sections, starting with an introduction to Streamlit, and ramp you up to building your own basic Streamlit applications. In part two, we'll extend this knowledge to more advanced topics such as production deployment methods and using components created by the Streamlit community for increasingly beautiful and usable Streamlit apps. And in the last part, we'll focus heavily on i...

Índice