Skip to content

Instantly share code, notes, and snippets.

View willium's full-sized avatar
🧛

William Wolf willium

🧛
View GitHub Profile
@willium
willium / mosaic-core.d.ts
Last active April 29, 2024 18:38
Incomplete types for mosaic. I tried my best to make them as correct as possible, with expansive use of unknown where types are not clear
declare module "@uwdata/mosaic-core" {
import type { Query } from "@uwdata/mosaic-sql";
import {
type AsyncDuckDB,
type AsyncDuckDBConnection,
} from "@duckdb/duckdb-wasm";
// Arrow Utilities
export declare function isArrowTable(
values: unknown,
{
"countTitle": "COUNT",
"numberFormat": "s",
"title": {
"anchor": "middle",
"align": "left",
"font": "Inter",
"fontSize": 18,
"fontWeight": 600,
"offset": 20
@willium
willium / .block
Created August 29, 2018 18:09 — forked from domoritz/.block
Vega-Lite Bl.ocks example
license: bsd-3-clause
def memoize(fn):
cache = dict()
def closure(*args):
if args not in cache:
cache[args] = fn(*args)
return cache[args]
return closure
@willium
willium / bar.vg.json
Created September 26, 2016 02:22
Vega Gist
{
"width": 400,
"height": 200,
"padding": {"top": 10, "left": 30, "bottom": 30, "right": 10},
"data": [
{
"name": "table",
"values": [
{"x": 1, "y": 28}, {"x": 2, "y": 55},
{"x": 3, "y": 43}, {"x": 4, "y": 91},

Keybase proof

I hereby claim:

  • I am willium on github.
  • I am willium (https://keybase.io/willium) on keybase.
  • I have a public key ASDc-DfC9a3McM4pn02gdFslk-CxpGQWbFd-T-P0iQ7HLQo

To claim this, I am signing this object:

{
"description": "A simple bar chart with embedded data.",
"layers": [
{
"name": "myBar",
"mark": "bar",
"data": {
"values": [
{"a": "A","b": 28},
{"a": "B","b": 55},
@willium
willium / research.md
Last active April 15, 2016 08:42
Tooltip research

Semantic Position

left, right, top left, top right, bottom left, bottom right, center?middle, top center, top middle

  • jQuery UI
  • qtip2
  • hint.css
  • opentip
  • tipped
  • tooltipster
  • bootstrap
@willium
willium / filtered_line.json
Last active May 10, 2016 07:35
vega label specs
{
"width": 1,
"height": 1,
"padding": "auto",
"data": [
{
"name": "source",
"url": "data/stocks.csv",
"format": {
"type": "csv",
* {
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
html {
width: 200px;
height: 600px;
margin: 0;
padding: 0;