Building Data-Driven Applications with Danfo.js - Rising Odegua - E-Book

Building Data-Driven Applications with Danfo.js E-Book

Rising Odegua

0,0
34,79 €

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

Mehr erfahren.
Beschreibung

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.

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

EPUB
MOBI

Seitenzahl: 395

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.



Building Data-Driven Applications with Danfo.js

A practical guide to data analysis and machine learning using JavaScript

Rising Odegua

Stephen Oni

Danfopress is an imprint of Packt Publishing

Building Data-Driven Applications with Danfo.js

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 authors, 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: Aditi Gour

Senior Editor: Roshan Kumar

Content Development Editor: Tazeen Shaikh

Technical Editor: Sonam Pandey

Copy Editor: Safis Editing

Project Coordinator: Aparna Ravikumar Nair

Proofreader: Safis Editing

Indexer: Rakhi Nair

Production Designer: Roshan Kawale

First published: September 2021

Production reference: 1190821

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham

B3 2PB, UK.

ISBN 978-1-80107-085-0

www.packt.com

To the memory of my father, Odegua, for all the sacrifices and dedication to ensure I have a good life. To my mother, Success Odegua, thank you for all the support. To my siblings, Kelvin, Harrison, Peace, Efosa, and Jerimiah, I love you all.

– Rising Odegua

I dedicate this to my parents (Mr and Mrs Oni) and to my lovely younger sister, and also to my friends and everyone who supported me during this period.

– Stephen Oni

Contributors

About the authors

Rising Odegua is the co-creator of Danfo.js and Dnotebook. He is a software and machine learning engineer with experience building data-driven applications in languages such as Python and JavaScript. Rising is actively engaged in building the developer ecosystem by giving talks, providing direct/indirect mentorship, working on open source projects, hosting meetups, and writing tutorials.

Stephen Oni is the co-creator of Danfo.js and Dnotebook. He is a software developer at Datopian, building data-driven platforms and tools. He is also an open source developer building tools that intersect the web and machine learning.

About the reviewers

Gant Laborde is an owner of Infinite Red, mentor, adjunct professor, published author, and award-winning speaker. For 20 years, he has been involved in software development and is still going strong today. He is recognized as a Google Developers Expert in web and machine learning, but informally he is an open sourcerer and aspires to one day become a mad scientist. He blogs, videos, and maintains popular repositories for the community. He is CIO and owner of Infinite Red, a React Native and AI consulting company. He is also the author of Learning TensorFlow.js (O'Reilly Media, Inc.). Special thanks to the TensorFlow.js community for being welcoming, and to my loving family for their support.

Matvii Hodovaniuk is a full-stack developer. He likes to work with JavaScript tools and explore new technologies. He works on writing skills and tools that can help him with writing both code and text during his free time.

Table of Contents

Preface

Section 1: The Basics

Chapter 1: An Overview of Modern JavaScript

Technical requirements

Understanding the difference between let and var

var allows the redeclaration of variables

var is not a blocked scope

Destructuring

Spread syntax

Spreading or unpacking an iterable into an array

Creating new objects from existing ones

Function arguments

Overview of scopes and closures

Scope

Closure

Understanding Array and Object methods

Array methods

Objects

Understanding the this property

Arrow functions

Promises and async/await

Cleaning callbacks with promises

async/await

Object-oriented programming and JavaScript classes

Classes

Inheritance

Setting up a modern JavaScript environment with transpilers

Babel

Webpack

Unit testing with Mocha and Chai

Setting up a test environment

Summary

Section 2: Data Analysis and Manipulation with Danfo.js and Dnotebook

Chapter 2: Dnotebook - An Interactive Computing Environment for JavaScript

Technical requirements

Introduction to Dnotebook

Setup and installation of Dnotebook

Basic concepts behind interactive computing in Dnotebook

Cells

Code cells

Markdown cells

Persistence/state

Writing interactive code

Loading external packages

Loading CSV files

Getting a div container for plots

Gotchas when using a for loop

Working with Markdown cells

Creating a Markdown cell

Adding images

Headings

Lists

Saving notebooks

Summary

Chapter 3: Getting Started with Danfo.js

Technical requirements

Why you need Danfo.js

Installing Danfo.js

Introducing Series and DataFrames

Series

DataFrames

Essential functions and methods in Danfo.js

loc and iloc indexing

Sorting

Filtering

Arithmetic operations

Logical operations

Data loading and working with different file formats

Transforming a DataFrame into another file format

Summary

Chapter 4: Data Analysis, Wrangling, and Transformation

Technical requirements

Transforming data

Replacing missing values

Removing duplicates

Data transformation with the map function

Data transformation with the apply function

Filtering and querying

Random sampling

Encoding DataFrames and Series

Combining datasets

DataFrame merge

Data concatenation

Series data accessors

Calculating statistics

Calculating statistics by axis

Summary

Chapter 5: Data Visualization with Plotly.js

Technical requirements

A brief primer on Plotly.js

Using Plotly.js via a script tag

Fundamentals of Plotly.js

Data format

Configuration options for plots

Plotly layout

Creating basic charts with Plotly.js

Creating statistical charts with Plotly.js

Creating histogram plots with Plotly.js

Creating box plots with Plotly.js

Creating violin plots with Plotly.js

Summary

Chapter 6: Data Visualization with Danfo.js

Technical requirements

Setting up Danfo.js for plotting

Adding Danfo.js to your code

Downloading a dataset for plotting

Creating line charts with Danfo.js

Creating scatter plots with Danfo.js

Creating box and violin plots with Danfo.js

Making box and violin plots for a Series

Box and violin plots for multiple columns

Box and violin plots with specific x and y values

Creating histograms with Danfo.js

Creating a histogram from a Series

Creating a histogram from multiple columns

Creating bar charts with Danfo.js

Creating a bar chart from a Series

Creating a bar chart from multiple columns

Summary

Chapter 7: Data Aggregation and Group Operations

Technical requirements

Grouping data

Single-column grouping

Double-column grouping

Iterating through grouped data

Iterating through single- and double-column grouped data

Using the .apply method

Data aggregation of grouped data

Data aggregation on single-column grouping

Data aggregation on double-column grouping

A simple application of groupby on real data

Summary

Section 3: Building Data-Driven Applications

Chapter 8: Creating a No-Code Data Analysis/Handling System

Technical requirements

Setting up the project environment

Structuring and designing the app

App layout and the DataTable component

Implementing DataTable components

File upload and state management

Creating different DataFrame operation components

Implementing the Describe component

Implementing the Query component

Implementing the Df2df component

Implementing the Arithmetic component

Implementing the chart component

Implementing the ChartPlane component

Implementing the ChartViz component

Integrating ChartViz and ChartPlane into App.js

Summary

Chapter 9: Basics of Machine Learning

Technical requirements

Introduction to machine learning

A simple analogy of a machine learning system

Why machine learning works

Objective functions

Evaluation metrics

Machine learning problems/tasks

Supervised learning

Unsupervised learning

Machine learning in JavaScript

Applications of machine learning

Resources to understand machine learning in depth

Summary

Chapter 10: Introduction to TensorFlow.js

Technical requirements

What is TensorFlow.js?

Installing and using TensorFlow.js

Setting up TensorFlow.js in the browser

Installing TensorFlow.js in Node.js

Tensors and basic operations on tensors

Creating tensors

Operating on tensors

Building a simple regression model with TensorFlow.js

Setting up your environment locally

Retrieving and processing the training dataset

Creating models with TensorFlow.js

Creating a simple three-layer regression model

Training the model with the processed dataset

Making predictions with the trained model

Summary

Chapter 11: Building a Recommendation System with Danfo.js and TensorFlow.js

Technical requirements

What is a recommendation system?

Collaborative filtering approach

Hybrid filtering approach

The neural network approach to creating a recommendation system

Building a movie recommendation system

Setting up your project directory

Retrieving and processing the training dataset

Building the recommendation model

Training and saving the recommendation model

Making movie recommendations with the saved model

Summary

Chapter 12: Building a Twitter Analysis Dashboard

Technical requirements

Setting up the project environment

Building the backend

Building the Twitter API

Building the text sentiment API

Building the frontend

Creating the Search component

Creating the ValueCounts component

Creating a plot component for sentiment analysis

Creating a Table component

Summary

Chapter 13: Appendix: Essential JavaScript Concepts

Technical requirements

Quick overview of JavaScript

Understanding the fundamentals of JavaScript

Declaring variables

Data types

Conditional branching and loops

JavaScript functions

Summary

Why subscribe?

Other Books You May Enjoy

Packt is searching for authors like you

Share Your Thoughts

Share Your Thoughts

Once you've read Building Data-Driven Applications with Danfo.js, we'd love to hear your thoughts! Please click here to go straight to the Amazon review page for this book and share your feedback.

Your review is important to us and the tech community and will help us make sure we're delivering excellent quality content.

Section 1: The Basics

This section introduces JavaScript and the Node.js framework. These concepts are needed in order to fully understand and use Danfo.js. It also introduces how to set up an environment for modern JavaScript using Babel and Node.js, and also teaches the reader some basics of code testing.

This section comprises the following chapters:

Chapter 1, An Overview of Modern JavaScript