Interactive Dashboards and Data Apps with Plotly and Dash
eBook - ePub

Interactive Dashboards and Data Apps with Plotly and Dash

Elias Dabbas

  1. 364 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

Interactive Dashboards and Data Apps with Plotly and Dash

Elias Dabbas

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

Build web-based, mobile-friendly analytic apps and interactive dashboards with Python

Key Features

  • Develop data apps and dashboards without any knowledge of JavaScript
  • Map different types of data such as integers, floats, and dates to bar charts, scatter plots, and more
  • Create controls and visual elements with multiple inputs and outputs and add functionality to the app as per your requirements

Book Description

Plotly's Dash framework is a life-saver for Python developers who want to develop complete data apps and interactive dashboards without JavaScript, but you'll need to have the right guide to make sure you're getting the most of it. With the help of this book, you'll be able to explore the functionalities of Dash for visualizing data in different ways.Interactive Dashboards and Data Apps with Plotly and Dash will first give you an overview of the Dash ecosystem, its main packages, and the third-party packages crucial for structuring and building different parts of your apps. You'll learn how to create a basic Dash app and add different features to it.Next, you'll integrate controls such as dropdowns, checkboxes, sliders, date pickers, and more in the app and then link them to charts and other outputs. Depending on the data you are visualizing, you'll also add several types of charts, including scatter plots, line plots, bar charts, histograms, and maps, as well as explore the options available for customizing them.By the end of this book, you'll have developed the skills you need to create and deploy an interactive dashboard, handle complexities and code refactoring, and understand the process of improving your application.

What you will learn

  • Find out how to run a fully interactive and easy-to-use app
  • Convert your charts to various formats including images and HTML files
  • Use Plotly Express and the grammar of graphics for easily mapping data to various visual attributes
  • Create different chart types, such as bar charts, scatter plots, histograms, maps, and more
  • Expand your app by creating dynamic pages that generate content based on URLs
  • Implement new callbacks to manage charts based on URLs and vice versa

Who this book is for

This Plotly Dash book is for data professionals and data analysts who want to gain a better understanding of their data with the help of different visualizations and dashboards – and without having to use JS. Basic knowledge of the Python programming language and HTML will help you to grasp the concepts covered in this book more effectively, but it's not a prerequisite.

]]>

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Interactive Dashboards and Data Apps with Plotly and Dash als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu Interactive Dashboards and Data Apps with Plotly and Dash von Elias Dabbas im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Informatik & Datenvisualisierung. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

Jahr
2021
ISBN
9781800560352

Section 1: Building a Dash App

This section provides a general overview of the Dash ecosystem, and shows how to get started with a minimal functional app.
This section comprises the following chapters:
  • Chapter 1, Overview of the Dash Ecosystem
  • Chapter 2, Exploring the Structure of a Dash App
  • Chapter 3, Working with Plotly's Figure Objects
  • Chapter 4, Data Manipulation and Preparation - Paving the Way to Plotly Express

Chapter 1: Overview of the Dash Ecosystem

One of the few constants in our work with data is the amount of change in the volume, sources, and types of data that we deal with. Being able to quickly combine data from different sources and explore them is crucial. Dash is not only for exploring data; it can be used for almost all phases of the data analysis process, from exploration to operational production environments.
In this chapter, we will get an overview of Dash's ecosystem and focus on building the layout, or the user-facing part, of the app. By the end of the chapter, you will be able to build a running app with almost any visual component you want, but without interactivity.
The following topics will be covered:
  • Setting up your environment
  • Exploring Dash and other supporting packages
  • Understanding the general structure of a Dash app
  • Creating and running the simplest app
  • Adding HTML and other components to the app
  • Learning how to structure the layout and managing themes

Technical requirements

Every chapter will have slightly different requirements, but there are some that you will need throughout the book.
You should have access to Python 3.6 or higher, which can be easily downloaded from https://www.python.org, as well as a text editor or an integrated development environment (IDE) so you can edit code.
For this chapter, we will be using Dash, Dash HTML Components, and Dash Bootstrap Components, which can be installed together with all other required packages by following the instructions in the following section. All code and data required for this book can be downloaded from the book's GitHub repository, which can be found athttps://github.com/PacktPublishing/Interactive-Dashboards-and-Data-Apps-with-Plotly-and-Dash. As I just mentioned, the following section will show in detail how to get started with your setup.
The code files of this chapter can be found on GitHub at https://github.com/PacktPublishing/Interactive-Dashboards-and-Data-Apps-with-Plotly-and-Dash/tree/master/chapter_01.
Check out the following video to see the Code in Action at https://bit.ly/3atXPjc.

Setting up your environment

With the fast pace of change in all the packages used in the book, you will most likely come across some differences in functionality, so in order to reproduce the exact outcomes described in the book, you can clone the book's repository, install the packages used (in the specified versions), and use the included dataset. From the command line, go to a folder in which you want to build the project and do the following:
  1. Create a Python virtual environment in a folder called dash_project (or any other name you want). This will also create a new folder with the name you chose:
    python3 –m venv dash_project
  2. Activate the virtual environment.
    On Unix or macOS, run this:
    source dash_project/bin/activate
    On Windows, run this:
    dash_project\Scripts\activate.bat
  3. Go to the created folder:
    cd dash_project
  4. Clone the book's GitHub repository:
    git clone https://github.com/PacktPublishing/Interactive-Dashboards-and-Data-Apps-with-Plotly-and-Dash
  5. You should now have a file containing the required packages and their versions called requirements.txt. You can install those packages by going to the repository's folder and running the install command as follows:
    cd Interactive-Dashboards-and-Data-Apps-with-Plotly-and-Dash/
    pip install -r requirements.txt
You should find a copy of the dataset in the data folder, which was downloaded from this link: https://datacatalog.worldbank.org/dataset/poverty-and-equity-database. You can get the latest version if you want, but as with packages, if you want to get the same results, it's better to work with the provided dataset.
In order for Plotly figures and apps to be displayed in JupyterLab, you will need to install Node.js, which can be install from https://nodejs.org.
You will also need to install the JupyterLab Plotly extension, which can be done by running the following from the command line in your virtual environment:
jupyter labextension install [email protected]
Note that the version number at the end should correspond to the version of Plotly that you are running. You can replace the preceding version numbers if you want to upgrade (making sure to upgrade the Plotly Python package as well).
Once you have run the preceding code, you should have everything you need to follow along. You will see that each chapter of this book builds on the previous one: we will be building an app that adds mor...

Inhaltsverzeichnis

Zitierstile für Interactive Dashboards and Data Apps with Plotly and Dash

APA 6 Citation

Dabbas, E. (2021). Interactive Dashboards and Data Apps with Plotly and Dash (1st ed.). Packt Publishing. Retrieved from https://www.perlego.com/book/2655070/interactive-dashboards-and-data-apps-with-plotly-and-dash-pdf (Original work published 2021)

Chicago Citation

Dabbas, Elias. (2021) 2021. Interactive Dashboards and Data Apps with Plotly and Dash. 1st ed. Packt Publishing. https://www.perlego.com/book/2655070/interactive-dashboards-and-data-apps-with-plotly-and-dash-pdf.

Harvard Citation

Dabbas, E. (2021) Interactive Dashboards and Data Apps with Plotly and Dash. 1st edn. Packt Publishing. Available at: https://www.perlego.com/book/2655070/interactive-dashboards-and-data-apps-with-plotly-and-dash-pdf (Accessed: 15 October 2022).

MLA 7 Citation

Dabbas, Elias. Interactive Dashboards and Data Apps with Plotly and Dash. 1st ed. Packt Publishing, 2021. Web. 15 Oct. 2022.