Skip to content

Instantly share code, notes, and snippets.

View djbarnwal's full-sized avatar

Dhiraj Barnwal djbarnwal

View GitHub Profile
@djbarnwal
djbarnwal / vega-table.json
Created March 27, 2025 22:12
vega-lite-table
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"title": {"text": "Net Promoter Score Analysis", "offset": 30},
"data": {
"values": [
{
"Product": "Product X01",
"Promoters": 0.87,
"Detractors": 0.03,
"Neutral": 0.1
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {
"values": [
{
"ts": "2021-12-07T18:30:00.000Z",
"ts_position": "2021-12-08T06:30:00.000Z",
"bin": 0,
"total_records": 6527,
"comparison.ts": "2021-11-30T18:30:00.000Z",
@djbarnwal
djbarnwal / vl-bug.json
Created April 4, 2024 11:24
Vega-Lite selection bug
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "A stacked area chart.",
"width": 1000,
"height": 400,
"data": {
"values": [
{
"dimension": "Department of Transportation",
"ts": "2020-12-20T18:30:00.000Z",
@djbarnwal
djbarnwal / budgetvl.json
Last active June 24, 2019 16:51
Budget VL
{
"$schema": "https://vega.github.io/schema/vega-lite/v3.json",
"background": "#edf1f7",
"description": "Google's stock price over time.",
"data": {
"url": "data/budgets.json"
},
"width": 700,
"height": 400,
"layer": [
{
"$schema": "https://vega.github.io/schema/vega-lite/v3.json",
"description": "Drag the sliders to highlight points.",
"data": {"url": "data/cars.json"},
"selection": {"CylYr": {"type": "multi"}},
"mark": "circle",
"encoding": {
"x": {"field": "Horsepower", "type": "quantitative"},
"y": {"field": "Miles_per_Gallon", "type": "quantitative"},
"color": {
@djbarnwal
djbarnwal / vega_compare_spec.json
Created May 20, 2019 18:41
Sample Vega Spec for Comparison Operator
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"autosize": "pad",
"padding": 5,
"width": 200,
"height": 200,
"style": "cell",
"data": [
{"name": "sel1_store"},
{"name": "sel2_store"},
@djbarnwal
djbarnwal / vegaClamping.json
Created May 7, 2019 18:49
Clamp with making zoom:1
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"autosize": "pad",
"padding": 5,
"width": 200,
"height": 200,
"style": "cell",
"data": [
{"name": "grid_store"},
{
@djbarnwal
djbarnwal / vl.json
Created May 1, 2019 21:50
Prototype for New Grammar
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"width": 500,
"height": 200,
"padding": 5,
"data": [
{
"name": "table",
"values": [
@djbarnwal
djbarnwal / list.js
Created January 9, 2019 17:26
Screenplays
[
"https://stephenfollows.com/resource-docs/scripts/eternal_sunshine_of_the_spotless_mind.pdf",
"https://www.scriptreaderpro.com/wp-content/uploads/2015/05/Good-Will-Hunting.pdf",
"https://www.scriptreaderpro.com/wp-content/uploads/2015/05/Jerry-Maguire.pdf",
"http://www.dailyscript.com/scripts/Little_Children-script.pdf",
"http://www.dailyscript.com/scripts/lost_in_translation.pdf",
"http://www.universalpicturesawards.com/site-content/uploads/2015/08/Straight-Outta-Compton-Screenplay.pdf",
"https://www.scriptreaderpro.com/wp-content/uploads/2018/03/Truman-Show-The-min-3.pdf",
"http://www.screenplaydb.com/film/scripts/up_in_the_air.pdf",
"https://www.scriptreaderpro.com/wp-content/uploads/2017/10/Visitor-The.compressed-ilovepdf-compressed.pdf",
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>new notebook - iodide</title>
<link rel="stylesheet" type="text/css" href="undefined/iodide.dev.css">
</head>
<body>
<script id="jsmd" type="text/jsmd">