Skip to content

Instantly share code, notes, and snippets.

View declann's full-sized avatar
👋

Declan Naughton declann

👋
View GitHub Profile
@declann
declann / positron-buffer-bug.ipynb
Created December 4, 2024 22:19
positron widget buffers issue
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@declann
declann / histogram.json
Created November 26, 2024 17:52
histogram
{
"meta": {
"title": "Histogram",
"description": "Below I overlay 2x distribtuions (overall + selected), but to make comparisons it's helpful if I can normalise"
},
"data": {
"flights": {
"file": "data/flights-200k.parquet"
}
},
@declann
declann / density.json
Created November 26, 2024 17:25
density.json
{
"meta": {
"title": "Density 1D",
"description": "Density plots (`densityY` mark) for over 200,000 flights, created using kernel density estimation. Binning is performned in-database, subsequent smoothing in-browser. The distance density uses a log-scaled domain. To change the amount of smoothing, use the slider to set the kernel bandwidth.\n"
},
"data": {
"flights": {
"file": "data/flights-200k.parquet"
}
},
@declann
declann / spec.json
Created September 14, 2024 15:07
canvas gradient bug
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"background": "white",
"padding": 5,
"data": [
{"name": "grid_store"},
{"name": "cashflow_store"},
{"name": "source_0", "values": [{"point_id_in":1,"t_in":-1,"zero_duration_in":false,"mort_rate_factor_in":3,"model_id":0,"input_cursor_id":1,"formula":"pv_premiums","value":94.84,"t_in_step_end":0,"A_keep_gte_0":true,"partition":"A","duration_n":0,"value_n":91.11563150937634,"t_in_mean":4.5},{"point_id_in":1,"t_in":-1,"zero_duration_in":false,"mort_rate_factor_in":3,"model_id":0,"input_cursor_id":1,"formula":"pv_premiums","value":94.84,"t_in_step_end":0,"A_keep_gte_0":true,"partition":"B","duration_n":0,"value_n":91.07068315793605,"t_in_mean":4.5},{"point_id_in":1,"t_in":-1,"zero_duration_in":false,"mort_rate_factor_in":3,"model_id":0,"input_cursor_id":1,"formula":"pv_premiums","value":94.84,"t_in_step_end":0,"A_keep_gte_0":true,"partition":"keep","duration_n":0,"value_n":91.07068315793605,"t_in_mean":4.5},{"point_id_in":1,"t_in":-1,"
@declann
declann / spec.json
Created September 10, 2024 11:46
hatch gradient
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "Google's stock price over time.",
"data": {"url": "data/stocks.csv"},
"transform": [{"filter": "datum.symbol==='GOOG'"}],
"layer": [
{"mark": {"type": "area", "fill": "orange"}},
{
"mark": {
"type": "area",
@declann
declann / spec.json
Created September 10, 2024 11:36
gradient texture
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "Google's stock price over time.",
"data": {"url": "data/stocks.csv"},
"transform": [{"filter": "datum.symbol==='GOOG'"}],
"layer": [
{"mark": {"type": "area", "fill": "red"}},
{
"mark": {
"type": "area",
@declann
declann / spec.json
Created September 10, 2024 11:30
Vega-Lite spec from Tue Sep 10 2024
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "Google's stock price over time.",
"data": {"url": "data/stocks.csv"},
"transform": [{"filter": "datum.symbol==='GOOG'"}],
"mark": {
"type": "area",
"line": {"color": "darkgreen"},
"fill": {
"x1": 0.1,
@declann
declann / spec.json
Created September 10, 2024 11:30
Vega-Lite spec from Tue Sep 10 2024
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "Google's stock price over time.",
"data": {"url": "data/stocks.csv"},
"transform": [{"filter": "datum.symbol==='GOOG'"}],
"mark": {
"type": "area",
"line": {"color": "darkgreen"},
"fill": {
"x1": 0.1,
@declann
declann / spec.json
Created August 19, 2024 17:54
Vega-Lite spec from Mon Aug 19 2024
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"title": "Seattle Weather, 2012-2015",
"data": {
"url": "data/seattle-weather.csv"
},
"vconcat": [
{ "width": 600,
"height": 300,
"layer":[{
{
"$schema": "https://vega.github.io/schema/vega/v4.json",
"width": 500,
"height": 200,
"autosize": "none",
"signals": [
{
"name": "whichPoint",
"on": [
{