Skip to content

Instantly share code, notes, and snippets.

View nicolaskruchten's full-sized avatar

Nicolas Kruchten nicolaskruchten

View GitHub Profile
@nicolaskruchten
nicolaskruchten / spec.json
Created February 14, 2024 00:01
Vega spec from Tue Feb 13 2024
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"data": [
{"name": "interval_intervalselection_0_store"},
{"name": "click_pointselection_0_store"},
{"name": "legend_pointselection_0_store"},
{"name": "legend_pointhover_0_store"},
{"name": "dataframe_2"},
{"name": "data_0"},
{
@nicolaskruchten
nicolaskruchten / spec.json
Created February 9, 2024 03:57
Vega spec from Thu Feb 08 2024
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"autosize": {"type": "fit", "contains": "padding"},
"background": "white",
"padding": 5,
"style": "cell",
"data": [
{"name": "interval_intervalselection_0_store"},
{"name": "click_pointselection_0_store"},
{"name": "legend_pointselection_0_store"},
@nicolaskruchten
nicolaskruchten / spec.json
Created February 6, 2024 19:30
Vega spec from Tue Feb 06 2024
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"autosize": {"type": "fit", "contains": "padding"},
"background": "white",
"padding": 5,
"style": "cell",
"data": [
{"name": "interval_intervalselection_0_store"},
{"name": "click_pointselection_0_store"},
{
@nicolaskruchten
nicolaskruchten / spec.json
Created February 6, 2024 19:28
Vega spec from Tue Feb 06 2024
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"data": [
{"name": "interval_intervalselection_0_store"},
{"name": "click_pointselection_0_store"},
{"name": "df"},
{
"name": "data_0",
"values": [
{"date": 946702800000, "sum_price": 230.82999999999998},
@nicolaskruchten
nicolaskruchten / spec.json
Created February 6, 2024 19:24
Vega spec from Tue Feb 06 2024
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"data": [
{"name": "interval_intervalselection_0_store"},
{"name": "click_pointselection_0_store"},
{"name": "df"},
{
"name": "data_0",
"values": [
{
@nicolaskruchten
nicolaskruchten / spec.json
Created February 6, 2024 19:21
Vega spec from Tue Feb 06 2024
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"autosize": {"type": "fit", "contains": "padding"},
"background": "white",
"padding": 5,
"style": "cell",
"data": [
{"name": "interval_intervalselection_0_store"},
{"name": "click_pointselection_0_store"},
{
@nicolaskruchten
nicolaskruchten / spec.json
Created February 6, 2024 00:00
Vega spec from Mon Feb 05 2024
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"background": "white",
"padding": 5,
"width": 200,
"height": 200,
"style": "cell",
"data": [
{"name": "pivot_hover_862a830d_f0c0_47d5_9ac9_eb7216fb8ddf_store"},
{
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import dash
from dash.dependencies import Input, Output
import dash_core_components as dcc
import dash_html_components as html
import plotly.express as px
gapminder = px.data.gapminder().query("year == 2007")
input_figure = px.scatter(gapminder, x="gdpPercap", y="lifeExp", size="pop",
custom_data=[gapminder.index], # this is the special bit!