This file contains hidden or 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
# /// script | |
# dependencies = [ | |
# "fire", | |
# "polars", | |
# "garmin-fit-sdk", | |
# ] | |
# /// | |
from __future__ import annotations | |
import logging |
This file contains hidden or 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
# /// script | |
# dependencies = [ | |
# "fire", | |
# "polars", | |
# "rich", | |
# "redshift_connector", | |
# ] | |
# /// | |
import json |
This file contains hidden or 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
{ | |
"config": { | |
"text": { | |
"color": "gray", | |
"fontSize": 14 | |
}, | |
"title": { | |
"anchor": "middle", | |
"fontWeight": "normal", | |
"titleFontWeight": "normal", |
This file contains hidden or 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
``` | |
{ | |
"$schema": "https://vega.github.io/schema/vega/v5.json", | |
"background": "white", | |
"padding": 5, | |
"width": 480, | |
"data": [ | |
{ | |
"name": "brush_store" | |
}, |
This file contains hidden or 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
year | day | color | count | |
---|---|---|---|---|
2015 | 25 | gold | 6695 | |
2015 | 25 | silver | 2534 | |
2015 | 24 | gold | 7727 | |
2015 | 24 | silver | 105 | |
2015 | 23 | gold | 8999 | |
2015 | 23 | silver | 44 | |
2015 | 22 | gold | 7378 | |
2015 | 22 | silver | 199 | |
2015 | 21 | gold | 9662 |
This file contains hidden or 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 numpy as np | |
import matplotlib.pyplot as plt | |
from cycler import cycler | |
import matplotlib.patheffects as path_effects | |
# %% | |
np.random.seed(1) | |
n, m = 200, 6 | |
x = np.arange(n) |
This file contains hidden or 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 polars as pl | |
def drop_columns_that_are_all_null(_df: pl.DataFrame) -> pl.DataFrame: | |
return _df[[s.name for s in _df if not (s.null_count() == _df.height)]] | |
This file contains hidden or 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
{ | |
"$schema": "https://vega.github.io/schema/vega/v5.json", | |
"background": "white", | |
"padding": 5, | |
"title": {"anchor": "middle", "text": "World Record Progression"}, | |
"data": [ | |
{"name": "param_13_store"}, | |
{"name": "param_14_store"}, | |
{ | |
"name": "data-f0a84751744be4555114288140dc4b49", |
This file contains hidden or 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
{ | |
"date of event": { | |
"0": -38275200000, | |
"1": 84240000000, | |
"2": 203472000000, | |
"3": 207100800000, | |
"4": 236563200000, | |
"5": 423878400000, | |
"6": 426038400000, | |
"7": 461980800000, |
This file contains hidden or 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
,date of event,percent of wr,event,sex,name,rank | |
0,1968-10-15,105.62440419447093,100 metres,Female,Wyomia Tyus,2501 | |
1,1972-09-02,105.52907530981888,100 metres,Female,Renate Stecher,2293 | |
2,1976-06-13,105.24308865586272,100 metres,Female,Ingeborg Helten,1774 | |
3,1976-07-25,104.95710200190658,100 metres,Female,Annegret Richter,1362 | |
4,1977-07-01,103.71782650142993,100 metres,Female,Marlies Göhr,338 | |
5,1983-06-08,103.05052430886559,100 metres,Female,Marlies Göhr,130 | |
6,1983-07-03,102.85986653956148,100 metres,Female,Evelyn Ashford,104 | |
7,1984-08-22,102.57387988560534,100 metres,Female,Evelyn Ashford,67 | |
8,1988-07-16,100.0,100 metres,Female,Florence Griffith-Joyner,1 |
NewerOlder