Getting Started with Streamlit for Data Science - Tyler Richards - E-Book

Getting Started with Streamlit for Data Science E-Book

Tyler Richards

0,0
50,39 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

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.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB
MOBI

Seitenzahl: 271

Veröffentlichungsjahr: 2021

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Getting Started with Streamlit for Data Science

Create and deploy Streamlit web applications from scratch in Python

Tyler Richards

BIRMINGHAM—MUMBAI

Getting Started with Streamlit for Data Science

Copyright © 2021 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

Group Product Manager: Kunal Parikh

Publishing Product Manager: Reshma Raman

Senior Editor: Mohammed Yusuf Imaratwale

Content Development Editor: Sean Lobo

Technical Editor: Devanshi Deepak Ayare

Copy Editor: Safis Editing

Project Coordinator: Aparna Ravikumar Nair

Proofreader: Safis Editing

Indexer: Rekha Nair

Production Designer: Vijay Kamble

First published: August 2021

Production reference: 1150721

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham

B3 2PB, UK.

ISBN 978-1-80056-550-0

www.packt.com

Contributors

About the author

Tyler Richards is a data scientist at Facebook, working on community integrity. Before this gig, his focus was on helping bolster the state of US elections for the nonprofit Protect Democracy. He is a data scientist and industrial engineer by training, which he gets to make use of in fun ways such as applying machine learning to local campus elections, creating algorithms to help P&G target Tide Pod users, and finding ways to determine the best ping pong players in friend groups. He is always looking for a new project, a new adventure.

About the reviewers

Randy Zwitch is head of developer relations at Streamlit. The developer relations team at Streamlit works with community members from around the world to help develop data apps and democratize decision-making across the enterprise. Randy is also a prolific open source contributor in the Python, Julia, and R communities. In his free time, Randy is an amateur luthier, building electric guitars and other stringed instruments at http://zwitchguitars.com/.

Weston Willingham studied industrial and systems engineering at the University of Florida before pivoting to data science. While completing the Galvanize Data Science Immersive program, Weston built several projects including a neural network for image detection and an audio transcriber trained to his own voice to improve presentation captioning. When not reading books, Weston can be found playing jazz piano and saxophone.

Table of Contents

Preface

Section 1: Creating Basic Streamlit Applications

Chapter 1: An Introduction to Streamlit

Technical requirements

Why Streamlit?

Installing Streamlit

Organizing Streamlit apps

Streamlit plotting demo

Making an app from scratch

Using user input in Streamlit apps

Finishing touches – adding text to Streamlit

Summary

Chapter 2: Uploading, Downloading, and Manipulating Data

Technical requirements

The setup – Palmer's Penguins

Exploring Palmer's Penguins

Flow control in Streamlit

Debugging Streamlit apps

Developing in Streamlit

Exploring in Jupyter and then copying to Streamlit

Data manipulation in Streamlit

An introduction to caching

Summary

Chapter 3: Data Visualization

Technical requirements

San Francisco Trees – A new dataset

Streamlit visualization use cases

Streamlit's built-in graphing functions

Streamlit's built-in visualization options

Plotly

Matplotlib and Seaborn

Bokeh

Altair

PyDeck

Summary

Chapter 4: Using Machine Learning with Streamlit

The standard ML workflow

Predicting penguin species

Utilizing a pre-trained ML model in Streamlit

Training models inside Streamlit apps

Understanding ML results

Summary

Chapter 5: Deploying Streamlit with Streamlit Sharing

Technical requirements

Getting started with Streamlit Sharing

A quick primer on GitHub

Deploying with Streamlit Sharing

Debugging Streamlit Sharing

Streamlit Secrets

Summary

Section 2: Advanced Streamlit Applications

Chapter 6: Beautifying Streamlit Apps

Technical requirements

Setting up the SF Trees dataset

Working with columns in Streamlit

Exploring page configuration

Using the Streamlit sidebar

Picking colors with Color Picker

Utilizing Streamlit themes

Summary

Chapter 7: Exploring Streamlit Components

Technical requirements

Using Streamlit Components – streamlit-embedcode

Using Streamlit Components – streamlit-lottie

Using Streamlit Components – streamlit-pandas-profiling

Finding more components

Summary 

Chapter 8: Deploying Streamlit Apps with Heroku and AWS

Technical requirements

Choosing between AWS, Streamlit Sharing, and Heroku

Deploying Streamlit with Heroku

Setting up and logging in to Heroku

Cloning and configuring our local repository

Deploying to Heroku

Deploying Streamlit with AWS

Selecting and launching a virtual machine

Installing the necessary software 

Cloning and running your app

Long-term AWS deployment

Section 3: Streamlit Use Cases

Chapter 9: Improving Job Applications with Streamlit

Technical requirements

Using Streamlit for proof of skill data projects

Machine learning – the Penguins app

Visualization – the Pretty Trees app

Improving job applications in Streamlit

Questions

Answering Question 1

Answering Question 2

Summary

Chapter 10: The Data Project – Prototyping Projects in Streamlit

Technical requirements

Data science ideation

Collecting and cleaning data

Making an MVP

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?

Iterative improvement

Beautification via animation

Organization using columns and width

Narrative building through text and additional statistics

Hosting and promotion

Summary

Chapter 11: Using Streamlit for Teams

Analyzing hypothetical survey costs using Streamlit for Teams

Setting up a new Streamlit app folder

Illustrating the representativeness of the sample

Calculating the cost of the sample

Using interaction to show trade-offs 

Creating and deploying apps from private repositories

User authentication with Streamlit

Summary

Chapter 12: Streamlit Power Users

Interview #1 – Fanilo Andrianasolo

Interview #2 – Johannes Rieke

Interview #3 – Adrien Treuille

Interview #4 – Charly Wargnier

Summary

Other Books You May Enjoy

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 StreamlitChapter 2, Uploading, Downloading, and Manipulating DataChapter 3, Data VisualizationChapter 4, Using Machine Learning with StreamlitChapter 5, Deploying Streamlit with Streamlit Sharing