## Matplotlib: Multiple Y-Axis Scales

Matplotlib's flexibility allows you to show a second scale on the y-axis. This example allows us to show monthly data with the corresponding annual total at those monthly rates.

The Matplotlib Axes.twinx method creates a new y-axis that shares the same x-axis. First we create an axis for the …

## Highlighting States With Cartopy

Here is how to highlight select US States with Cartopy. (You can also highlight select countries with Cartopy.)

Define which states to highlight in states.csv, and run states.py:

import matplotlib.patches as mpatches
import matplotlib.pyplot as plt
import shapely.geometry as sgeom

import cartopy.crs as ccrs …

## Python with the Google Maps API

The Google Maps Platform offers a number of APIs to get maps, routes, and places information. In this example, I will demonstrate how to get coordinates of an address using the Geocoding API.

## Book Value vs. Market Value Exposure Report

It is important for a capital business to understand the exposure on its books. Here is a quick visualization of exposure vs. market value using matplotlib.

## Book Value vs. Market Value

The book value of an asset is the value recorded on a company's balance sheet. This value typically decreases …

## Visualizing An Infant's Schedule

A newborn may only eat, sleep, and poop, but they sure do it a lot! Here is a sample of two weeks of an an infant's schedule visualized with matplotlib.

A while ago I came across a radial sleep schedule plot and thought it was a creative way to visualize …

## Diff Two Excel Files with Python

It's handy to be able to quickly find the differences between two Excel files. Below is a quick example of doing so using Python and pandas.

Plenty of others have solved this problem. Here's a good write-up by pbpython (and the updated version) and a version by yassineAlouini. Wanting a …

## US Airports and Heliports

In a previous post I used Altair to plot an interactive map of US airports using data from vega examples. I found another dataset that includes airport elevation which makes exploring the data all the more interesting.

The OurAirports airports.csv dataset includes elevation data for airports and heliports. I …

## Altair: Interactive Plots on the Web

Contents

Adding interactivity to data visualizations can be helpful for better exploring the data and fun. Sharing interactive visualizations online extends the benefits to others. In this post I will show some examples of using …

## Automation Using Python

I previously wrote about automation using Makefiles to bundle together running multiple scripts into a single command. Using the subprocess library we can perform the same tasks entirely in Python.

# Why Python?

Make is a quick and easy to use tool for automation, and may be a good option. But …