We present here some data visualization techniques using Python's Seaborn, Matplotlib and Altair libraries. We will use the Palmerpenguin dataset to map out: (1) Pie Charts for Categorical Data (2) Aesthetics and Themes (3) Scatter Plots for Continuous Variables, (4) Trend Lines, (5) Histograms for Data Distribution and (6) Categorical Variable.
Below, we download Crytocurrency Data using yahoo finance and perform basic analysis using pandas. In this colab we introduce different ways to extract from yahoo finance cryptocurrency data and perform basic analysis and visualization with matplotlib and mplfinance libraries.
One of its strongest features is its ability to render a vast range of visualizations using Python libraries. Among these libraries, Matplotlib stands out as a foundational plotting library, powering many other visualization tools within the Python ecosystem.
Matplotlib: Subplotting using subplot2grid Matplotlib's subplot2grid is a versatile method for creating complex grid layouts for subplots. Unlike the regular subplot, which typically requires you to specify a number for rows, columns, and the index, subplot2grid provides an intuitive way to design layouts. The method allows you to specify the position and span of each subplot in a grid format. This flexibility is particularly useful when you want different sizes or layouts for multiple subplots within the same figure. 3D Scatter Plots In the earlier outputs, 3D scatter plots were created using both Matplotlib and Plotly for the palmerpenguins dataset. The dataset's attributes - bill_length_mm, bill_depth_mm, and flipper_length_mm were utilized as X, Y, and Z axes respectively. The data points were color-coded based on species. While both tools provided visually appealing plots, Plotly offered an interactive visualization where users can rotate, zoom, and hover over data points to obtain more information. Matplotlib, on the other hand, produced a static visualization but is highly customizable. Altair vs. Plotly Altair is a declarative statistical visualization library in Python. Unlike Plotly, which provides both a Python-based API and a stand-alone web-based platform, Altair is primarily designed for the Python environment. Altair has a simple syntax that builds on a solid foundation of theorems about visualization. Its strength lies in its simplicity and its tight integration with the Pandas data framework. While Plotly is more versatile, especially in building interactive dashboards and apps with its Dash framework, Altair shines in its straightforward and intuitive creation of complex visualizations. Plotly's interactivity is more native and advanced, suitable for building web applications, whereas Altair's primary focus is on data exploration in a Jupyter Notebook or similar Python environments.