# Data Visualization

## boxplot() – The Pandas.plotting Module

A box plot is a method used in statistics to graphically show a group, or groups, of numerical data with their quartiles identified. A box plot is often also called a box-and-whisker plot, as the plot may have lines extending from the box to show data outside the upper and lower quartiles. In this article, …

## How to Develop LARS Regression Models in Python?

What is LARS regression? Regression is the analysis of how a variable (the outcome variable) depends on the evolution of other variables (explanatory variables). In regression, we are looking for the answer to the question of what is the function that can be used to predict the value of another variable Y by knowing the …

## bootstrap_plot() – Pandas Plotting Module

A bootstrap plot is a graphical representation of uncertainty in a characteristic chosen from within a population. While we can usually calculate data confidence levels mathematically, gaining access to the desired characteristics from some populations is impossible or impracticable. In this case, bootstrap sampling and the bootstrap plot come to our aid. This article will …

## Analyzing News Articles with Newspaper3k, TextBlob, and Seaborn

In this final installment of my series on Newspaper3k, we will see the real possibilities of what we can do after scraping massive amounts of news articles.  To demonstrate data will be collected from 3 popular American news websites for a full year, from September of 2020 to August of 2021.  We will analyze articles …

## Plotting a Load-Duration Curve with Python

You can check out the code in this article in the interactive Jupyter notebook here (Google Colab). Introduction A popular query in Google is about load-duration curves. Some of the questions are: What is a load-duration curve? What is the importance of a load-duration curve? How do you calculate a load-duration curve? What is the …

## Bollinger Bands Algorithm – Python Binance API for Crypto Trading

A Bollinger Band consists of three lines: a simple moving average, an upper band, and a lower band. The assumption is that if the real price crosses over one of the bands, this can be seen as a signal to trade in or our of a given asset. For cryptocurrencies, breakout trades are more frequently …

## Pandas Plotting Autocorrelation

A correlogram is a chart used in data analysis to check for randomness in a data set, hence the name. The less the degree of randomness, the more there is a correlation between the data. The correlogram chart highlights any potential statistical significance between data points. An autocorrelogram checks for the same degree of correlation …

## The Pandas Plotting Module: Generating Andrews Curves

Andrews curves are used to identify structure in a multi-dimensional data set. By reducing complex data to a two-dimensional graph, we can more easily identify variables in the data that are associated, form clusters, or are outliers. We’ll show you how to plot such graphs, but before we get to that, let’s ensure every reader …

## How to Change the Figure Size for a Seaborn Plot?

Seaborn is a comprehensive data visualization library used for the plotting of statistical graphs in Python. It provides fine-looking default styles and color schemes for making more attractive statistical plots. Seaborn is built on the top portion of the matplotlib library and is also integrated closely with data structures from pandas.                                                             How to change …

## How to Add a Second x-axis in Python Matplotlib?

Problem Formulation Given some data. How to plot the data in the same 2D plot but using two x-axes instead of only one? You want to have on top axis and one bottom axis. You want to be able to customize the ticks and labels of both the top and bottom axis. We use Matplotlib …

## Smoothing Your Data with the Savitzky-Golay Filter and Python

This article deals with signal processing. More precisely, it shows how to smooth a data set that presents some fluctuations, in order to obtain a resulting signal that is more understandable and easier to be analyzed. In order to smooth a data set, we need to use a filter, i.e. a mathematical procedure that allows …

## Matplotlib Text and Annotate — A Simple Guide

You’d like to add text to your plot, perhaps to explain an outlier or label points. Matplotlib‘s text method allows you to add text as specified coordinates. But if you want the text to refer to a particular point, but you don’t want the text centered on that point? Often you’ll want the text slightly …