This is a data set of the cost of repairing damage done to shipping containers. Each repair involves a type of damage done to a part of a container. And each repair has an associated cost. The question is how much does a set of damage-part pairs contribute to the total cost of repairs? And, if an intervention were made to address some types of damage and/or some part how much savings would result? This chart shows the damage types (left side) and the part types (right side). The height of each block indicates the blocks contribution to the total repair costs. The bands between the two sides show the cost contribution of each damage/part pair. Dark gray bands are selected for the total percentage number, while light gray bands are not. Putting your mouse over a block label will show what contributes to the repair costs associated with that block. You can change which damage/part pairs are selected by clicking on the blocks. Within each block. Only damage/part pairs where both the damage and part a
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This script watches a gmail account for any thread labeled with 'rtm'. When such a thread is found it | |
sends a task-creation email to Remember the Milk that includes a link back to the original thread. | |
To follow the link back to the email you have to be logged in to the originating Gmail account (which | |
is only an issue if you have multiple gmail accounts). Otherwise Google claims the email cannot be | |
found. | |
To install it go into Google Drive and create a new "Script" (the link is a bit hidden in the create submenu). | |
Copy this code into the new project and set a time-based trigger. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import matplotlib.pyplot as plt | |
def combined_label(perc, tot): | |
""" | |
Format a label to include by Euros and %. | |
""" | |
return "{0:,.0f}k EUR, {1:.0f}%".format(perc * tot / 1000, perc * 100) | |
def cost_cum(data, focus, subject): |
For continuous data such as time series, a streamgraph can be used in place of stacked bars. This example also demonstrates path transitions to interpolate between different layouts. Streamgraph algorithm, colors, and data generation inspired by Byron and Wattenberg.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def _get_notes(prev_tag, next_tag): | |
with hide('stdout'): | |
commits = run("git log --graph --pretty=format:'%h - %s (%cr by %an)%d' " | |
+ "--abbrev-commit --date=relative"+ " %s..%s" | |
% (prev_tag, next_tag)).splitlines() | |
commits.pop() # prev_tag went out with the previous release notes. | |
commits.reverse() # order going down with time | |
commits = "\n".join(commits) | |
commits = re.sub(r"\\",r"__SUB__", commits) | |
commits = re.sub(r"/",r"\\", commits) |