Book Image

Building Data-Driven Applications with Danfo.js

By : Rising Odegua, Stephen Oni
Book Image

Building Data-Driven Applications with Danfo.js

By: Rising Odegua, Stephen Oni

Overview of this book

Most data analysts use Python and pandas for data processing for the convenience and performance these libraries provide. However, JavaScript developers have always wanted to use machine learning in the browser as well. This book focuses on how Danfo.js brings data processing, analysis, and ML tools to JavaScript developers and how to make the most of this library to build data-driven applications. Starting with an overview of modern JavaScript, you’ll cover data analysis and transformation with Danfo.js and Dnotebook. The book then shows you how to load different datasets, combine and analyze them by performing operations such as handling missing values and string manipulations. You’ll also get to grips with data plotting, visualization, aggregation, and group operations by combining Danfo.js with Plotly. As you advance, you’ll create a no-code data analysis and handling system and create-react-app, react-table, react-chart, Draggable.js, and tailwindcss, and understand how to use TensorFlow.js and Danfo.js to build a recommendation system. Finally, you’ll build a Twitter analytics dashboard powered by Danfo.js, Next.js, node-nlp, and Twit.js. By the end of this app development book, you’ll be able to build and embed data analytics, visualization, and ML capabilities into any JavaScript app in server-side Node.js or the browser.
Table of Contents (18 chapters)
1
Section 1: The Basics
3
Section 2: Data Analysis and Manipulation with Danfo.js and Dnotebook
10
Section 3: Building Data-Driven Applications

What this book covers

Chapter 1, An Overview of Modern JavaScript, discusses ECMA 6 syntax and the use of import statements, class methods, extend methods, and constructors. It also goes deep into an explanation of the Promise method, the use of async and await functions, and the fetch method. It also introduces how to set up an environment that supports modern JavaScript syntax, and proper versioning, as well as covering how to write unit tests.

Chapter 2, Dnotebook - An Interactive Computing Environment for JavaScript, dives into Dnotebook. For readers coming from the Python ecosystem, this is similar to Jupyter Notebook. We discuss how to use Dnotebook, how to create and delete cells, how to write Markdown in it, and how to save and share your notebook.

Chapter 3, Getting Started with Danfo.js, introduces Danfo.js and how to create DataFrames and series. It also introduces some essential methods for data analysis and processing.

Chapter 4, Data Analysis, Wrangling, and Transformation, looks at the practical use of Danfo.js for real-world datasets. Here, you'll learn how to load different types of datasets and analyze them by performing operations such as missing-value handling, calculating descriptive statistics, performing mathematical operations, combining datasets, and string manipulations.

Chapter 5, Data Visualization with Plotly.js, introduces data plotting and visualization. Here, you'll learn the basics of data visualization and plotting, and how to use Plotly.js for basic plotting.

Chapter 6, Data Visualization with Danfo.js, introduces data plotting and visualization with Danfo.js. Here, you'll learn how to use Danfo.js for creating plots directly on DataFrames or series. You will also learn how to customize Danfo.js plots.

Chapter 7, Data Aggregation and Group Operations, introduces group-by operations and how to perform them with Danfo.js, including how to group by one or more columns, how to use the provided group-by-aggregate functions, and how to create custom aggregate functions with .apply. We also show how the internals of the group-by operation work.

Chapter 8, Creating a No-Code Data Analysis/Handling System, shows what Danfo.js can enable us to do. In this chapter, we will create a no-code data-handling and analysis environment where the user can upload their data and then analyze and process their data artistically.

Chapter 9, Basics of Machine Learning, introduces ML in simple terms. It also shows you how ML can be done in the browser with the help of some ML JavaScript tools.

Chapter 10, Introduction to TensorFlow.js, introduces TensorFlow.js. It also shows how to perform basic mathematical operations and how to create, train, save, and reload an ML model. This chapter also shows how to integrate Danfo.js and Tensorflow.js to train a model effectively.

Chapter 11, Building a Recommendation System with Danfo.js and TensorFlow.js, shows you how to build a movie recommendation system using TensorFlow.js and Danfo.js. It shows you how to train models in Node.js and how to integrate them with the client side. It also shows how Danfo.js makes data preprocessing easy.

Chapter 12, Building a Twitter Analysis Dashboard, is where you will build a Twitter analytics dashboard using Danfo.js at the frontend and backend; the aim is to show how easy it is to use the same library throughout for your data analytics app, compared to using Python for the backend and JavaScript for the frontend, for instance.

Chapter 13, Appendix: Essential JavaScript Concepts, introduces the JavaScript programming language. Here, we introduce beginners to variable definitions, function creation, and the different ways to perform computations in JavaScript.