code-samples (Page 1)

Generating and plotting stock or crypto data with Matplotlib

We generate high, low, open, close and volume data using a simple method for a fictitious stock or crypto, plot it on a candlestick chart and use a custom font from disk to render the plot.

Mapping UK shopping centres using data wrangling with BeautifulSoup and plotting with Plotly Express and Mapbox

I step through extracting geo-data from a Wikipedia table (or any HTML source) and plotting it on an interactive canvas.

Plotting European capitals, centroids and the distance between them using geopandas

Does the capital of a country tend to be geographically close to the center? (Answer - not really.)

Creating a choropleth map with geopandas and using multiple subplots

Exploration of basic plotting with geopandas and collating them into subplots. Formatting it and editing the colormap legends.

Visualising country data as a tilemap using pyplot and imshow

I show how to lay out countries in a tilemap and populate them as a heatmap using pyplot imshow.

Comparing string and md5 hash dissimilarity using hashlib and jellyfish

Demonstrating that similarity of pairs of strings is uncorrelated to Jaro and Damerau-Levenshtein similarity of their md5 hashes.

Circular visualization of daily and monthly data with KPI ring chart and custom colormap

Code examples and walkthrough of visualising daily data by month on a circular plot, and applying a custom color map. A single plot and monthly sub-plots are shown.

Creating circular plots based on the concepts of a bar chart, using matplotlib

Mapping a bar chart to a circular plot, with variations on circular plotting.