Visualizations
Goal Rush
Everything you need to create beautiful, engaging, and interactive Goal Rush visualizations.
Importing PlotAPI Goal Rush
Let's import GoalRush from the PlotAPI package.
from plotapi import GoalRush
We've already activated our license with the license activation instructions.
Data structure
PlotAPI Goal Rush expects at minimum a list of dictionary items, these will define the progress over time.
progress = [
{"date": "09/14/24", "value": 10},
{"date": "09/15/24", "value": 9},
{"date": "09/16/24", "value": 15},
{"date": "09/17/24", "value": 3},
{"date": "09/18/24", "value": 16},
{"date": "09/19/24", "value": 17},
{"date": "09/20/24", "value": 4},
]
We can see that each dictionary item has three properties:
-
datewhich indicates the date that this progress belongs to. This should be a string date in the format"%m/%d/%y". -
valuewhich indicates the contribution towards the goal.
We can specify a goal with the following structure.
goals = [
{
"date_start": "09/14/24",
"date_end": "09/20/24",
"value": 50,
}
]
We can see that the dictionary has three properties:
-
date_startanddate_end, which indicates the start and the end of a goal session. -
value, which indicates the goal value.
Default visualization
Creating our first Goal Rush Diagram is as easy as calling PlotAPI with our one input.
Be sure to interact with the visualisation to see what the default settings can do!
GoalRush(progress, goals=goals).show()