Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files- _file/data/config.05513390.json +1 -0
- _file/data/{posts.4e3f4ea9.csv β posts.36b9d40b.csv} +0 -0
- _file/data/setup.f452f82e.json +0 -3
- _observablehq/{client.0d4e9b14.js β client.4d3b1f74.js} +1 -1
- _observablehq/{runtime.3f7f73d9.js β runtime.c4c9c1af.js} +1 -1
- _observablehq/{stdlib.2229c972.js β stdlib.b89f0aee.js} +1 -1
- index.html +25 -16
_file/data/config.05513390.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"discourse_url":"https://discuss.huggingface.co"}
|
_file/data/{posts.4e3f4ea9.csv β posts.36b9d40b.csv}
RENAMED
The diff for this file is too large to render.
See raw diff
|
|
_file/data/setup.f452f82e.json
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"base_url": "https://discuss.huggingface.co/"
|
3 |
-
}
|
|
|
|
|
|
|
|
_observablehq/{client.0d4e9b14.js β client.4d3b1f74.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
var ie=Object.defineProperty;var n=(e,t)=>ie(e,"name",{value:t,configurable:!0});import{Inspector as j,Runtime as le}from"./runtime.3f7f73d9.js";import{Generators as $,resize as ce,FileAttachment as de,Mutable as pe}from"./stdlib.2229c972.js";var ue=Object.defineProperty,A=n((e,t)=>ue(e,"name",{value:t,configurable:!0}),"o$2");const B=document.createElement("template");B.innerHTML='<button title="Copy code" class="observablehq-pre-copy"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2"><path d="M2 6C2 5.44772 2.44772 5 3 5H10C10.5523 5 11 5.44772 11 6V13C11 13.5523 10.5523 14 10 14H3C2.44772 14 2 13.5523 2 13V6Z M4 2.00004L12 2.00001C13.1046 2 14 2.89544 14 4.00001V12"></path></svg></button>',O();function O(){for(const e of document.querySelectorAll("pre:not([data-copy=none])")){const t=e.parentNode;if(t.classList.contains("observablehq-pre-container"))continue;const r=t.insertBefore(document.createElement("div"),e);r.className="observablehq-pre-container",Object.assign(r.dataset,e.dataset),r.appendChild(B.content.cloneNode(!0).firstChild).addEventListener("click",D),r.appendChild(e)}}n(O,"r$2"),A(O,"enableCopyButtons");async function D({currentTarget:e}){await navigator.clipboard.writeText(e.nextElementSibling.textContent.trim());const[t]=e.getAnimations({subtree:!0});t&&(t.currentTime=0),e.classList.add("observablehq-pre-copied"),e.addEventListener("animationend",()=>e.classList.remove("observablehq-pre-copied"),{once:!0})}n(D,"c$3"),A(D,"copy");var me=Object.defineProperty,S=n((e,t)=>me(e,"name",{value:t,configurable:!0}),"s$2");const c=document.querySelector("#observablehq-sidebar-toggle");if(c){let e=c.indeterminate;const t=S(()=>matchMedia("(min-width: calc(640px + 6rem + 272px))").matches,"match");c.onclick=()=>{const o=t();e?(c.checked=!o,e=!1):c.checked===o&&(e=!0),c.indeterminate=e,e?sessionStorage.removeItem("observablehq-sidebar"):sessionStorage.setItem("observablehq-sidebar",c.checked)},addEventListener("keydown",o=>{o.code==="Escape"&&!t()&&(!c.indeterminate&&c.checked&&(o.target===document.body||o.target===c)||o.target?.closest("#observablehq-sidebar"))&&c.click()}),addEventListener("keypress",o=>{o.code==="KeyB"&&(o.metaKey||o.altKey)&&!o.ctrlKey&&(o.target===document.body||o.target===c||o.target?.closest("#observablehq-sidebar"))&&(c.click(),o.preventDefault())});const r=`Toggle sidebar ${/Mac|iPhone/.test(navigator.platform)?/Firefox/.test(navigator.userAgent)?"\u2325":"\u2318":"Alt-"}B`;for(const o of document.querySelectorAll("#observablehq-sidebar-toggle, label[for='observablehq-sidebar-toggle']"))o.title=r}function R(e){e.detail>1&&e.preventDefault()}n(R,"l$4"),S(R,"preventDoubleClick");function I(){sessionStorage.setItem(`observablehq-sidebar:${this.firstElementChild.textContent}`,this.open)}n(I,"c$2"),S(I,"persistOpen");for(const e of document.querySelectorAll("#observablehq-sidebar summary"))e.onmousedown=R,e.parentElement.ontoggle=I;var fe=Object.defineProperty,P=n((e,t)=>fe(e,"name",{value:t,configurable:!0}),"l$3");const x=document.querySelector("#observablehq-toc");if(x){const e=x.appendChild(document.createElement("div"));e.classList.add("observablehq-secondary-link-highlight");const t=document.querySelector("#observablehq-main"),r=Array.from(t.querySelectorAll(x.dataset.selector)).reverse(),o=x.querySelectorAll(".observablehq-secondary-link"),m=P(()=>{for(const a of o)a.classList.remove("observablehq-secondary-link-active");if(location.hash)for(const a of r){const f=encodeURI(`#${a.id}`);if(f===location.hash){const h=a.getBoundingClientRect().top;if(0<h&&h<40){for(const q of o)if(q.querySelector("a[href]")?.hash===f)return q.classList.add("observablehq-secondary-link-active"),q;return}break}}for(const a of r){if(a.getBoundingClientRect().top>=innerHeight*.5)continue;const f=a.querySelector("a[href]")?.hash;for(const h of o)if(h.querySelector("a[href]")?.hash===f)return h.classList.add("observablehq-secondary-link-active"),h;break}},"relink"),g=P(()=>{const a=m();e.style.cssText=a?`top: ${a.offsetTop}px; height: ${a.offsetHeight}px;`:""},"intersected"),y=new IntersectionObserver(g,{rootMargin:"0px 0px -50% 0px"});for(const a of r)y.observe(a)}var he=Object.defineProperty,T=n((e,t)=>he(e,"name",{value:t,configurable:!0}),"r$1");function M(e,t){const r=document.createElement("div");if(new j(r).fulfilled(e),t)for(const o of t){let m=r;for(const g of o)m=m?.childNodes[g];m?.dispatchEvent(new Event("mouseup"))}return r}n(M,"f$2"),T(M,"inspect");function z(e){const t=document.createElement("div");return new j(t).rejected(e),t.classList.add("observablehq--error"),t}n(z,"l$2"),T(z,"inspectError");var be=Object.defineProperty,s=n((e,t)=>be(e,"name",{value:t,configurable:!0}),"o");const ve=s(()=>import("../_npm/lodash@4.17.21/_esm.js").then(e=>e.default),"_"),ge=s(()=>import("../_npm/arquero@7.0.0/_esm.js"),"aq"),ye=s(()=>import("../_npm/apache-arrow@17.0.0/_esm.js"),"Arrow"),qe=s(()=>import("../_npm/d3@7.9.0/7055d4c5.js"),"d3"),$e=s(()=>import("./stdlib/dot.js").then(e=>e.default),"dot"),we=s(()=>import("../_npm/@duckdb/duckdb-wasm@1.28.0/_esm.js"),"duckdb"),_e=s(()=>import("./stdlib/duckdb.js").then(e=>e.DuckDBClient),"DuckDBClient"),xe=s(()=>import("../_npm/echarts@5.5.1/dist/echarts.esm.min.js._esm.js"),"echarts"),ke=s(()=>import("../_npm/htl@0.3.1/_esm.js"),"htl"),Ce=s(()=>import("../_npm/htl@0.3.1/_esm.js").then(e=>e.html),"html"),Le=s(()=>import("../_npm/htl@0.3.1/_esm.js").then(e=>e.svg),"svg"),Ee=s(()=>import("./stdlib/inputs.js"),"Inputs"),Se=s(()=>import("../_npm/leaflet@1.9.4/_esm.js"),"L"),Ne=s(()=>import("../_npm/mapbox-gl@3.6.0/_esm.js").then(e=>e.default),"mapboxgl"),je=s(()=>import("./stdlib/mermaid.js").then(e=>e.default),"mermaid"),Ae=s(()=>import("../_npm/@observablehq/plot@0.6.16/e828d8c8.js"),"Plot"),Be=s(()=>import("../_npm/react@18.3.1/_esm.js"),"React"),Oe=s(()=>import("../_npm/react-dom@18.3.1/_esm.js"),"ReactDOM"),De=s(()=>import("./stdlib/duckdb.js").then(e=>e.sql),"sql"),Re=s(()=>import("./stdlib/sqlite.js").then(e=>e.default),"SQLite"),Ie=s(()=>import("./stdlib/sqlite.js").then(e=>e.SQLiteDatabaseClient),"SQLiteDatabaseClient"),Pe=s(()=>import("./stdlib/tex.js").then(e=>e.default),"tex"),Te=s(()=>import("../_npm/topojson-client@3.1.0/_esm.js"),"topojson"),Me=s(()=>import("./stdlib/vgplot.js").then(e=>e.default()),"vg"),ze=s(()=>import("./stdlib/vega-lite.js").then(e=>e.default),"vl");var Qe=Object.freeze({__proto__:null,Arrow:ye,DuckDBClient:_e,Inputs:Ee,L:Se,Plot:Ae,React:Be,ReactDOM:Oe,SQLite:Re,SQLiteDatabaseClient:Ie,_:ve,aq:ge,d3:qe,dot:$e,duckdb:we,echarts:xe,htl:ke,html:Ce,mapboxgl:Ne,mermaid:je,sql:De,svg:Le,tex:Pe,topojson:Te,vg:Me,vl:ze}),He=Object.defineProperty,l=n((e,t)=>He(e,"name",{value:t,configurable:!0}),"e");const Ve=l(()=>d(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/aapl.csv"),!0),"aapl"),Ke=l(()=>d(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/alphabet.csv"),!0),"alphabet"),Fe=l(()=>d(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/cars.csv"),!0),"cars"),Ge=l(()=>d(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/citywages.csv"),!0),"citywages"),Je=l(()=>d(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/diamonds.csv"),!0),"diamonds"),Ue=l(()=>d(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/flare.csv"),!0),"flare"),Ze=l(()=>d(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/industries.csv"),!0),"industries"),We=l(()=>Q(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/miserables.json")),"miserables"),Xe=l(()=>d(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/olympians.csv"),!0),"olympians"),Ye=l(()=>d(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/penguins.csv"),!0),"penguins"),et=l(()=>d(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/pizza.csv"),!0),"pizza"),tt=l(()=>d(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/weather.csv"),!0),"weather");async function Q(e){const t=await fetch(e);if(!t.ok)throw new Error(`unable to fetch ${e}: status ${t.status}`);return t.json()}n(Q,"w$1"),l(Q,"json");async function H(e){const t=await fetch(e);if(!t.ok)throw new Error(`unable to fetch ${e}: status ${t.status}`);return t.text()}n(H,"y"),l(H,"text");async function d(e,t){const[r,o]=await Promise.all([H(e),import("../_npm/d3-dsv@3.0.1/407f7a1f.js")]);return o.csvParse(r,t&&o.autoType)}n(d,"t"),l(d,"csv");var ot=Object.freeze({__proto__:null,aapl:Ve,alphabet:Ke,cars:Fe,citywages:Ge,diamonds:Je,flare:Ue,industries:Ze,miserables:We,olympians:Xe,penguins:Ye,pizza:et,weather:tt}),rt=Object.defineProperty,i=n((e,t)=>rt(e,"name",{value:t,configurable:!0}),"i");const nt={now:()=>$.now(),width:()=>$.width(document.querySelector("main")),dark:()=>$.dark(),resize:()=>ce,FileAttachment:()=>de,Generators:()=>$,Mutable:()=>pe,...Qe,...ot},st=new le(nt),V=st.module(),N=new Map,k=X(document.body);function K(e){const{id:t,mode:r,inputs:o=[],outputs:m=[],body:g}=e,y=[];N.set(t,{cell:e,variables:y});const a=k.get(t),f=te(a);a._nodes=[],r===void 0&&(a._expanded=[]),f&&a._nodes.push(f);const h=i(()=>G(a,f),"pending"),q=i(b=>J(a,b),"rejected"),u=V.variable({_node:a.parentNode,pending:h,rejected:q},{shadow:{}});if(o.includes("display")||o.includes("view")){let b=-1;const L=r==="jsx"?F:w,se=r==="inline"?Z:r==="jsx"?U:W,E=new u.constructor(2,u._module);if(E.define(o.filter(p=>p!=="display"&&p!=="view"),()=>{let p=u._version;return _=>{if(p<b)throw new Error("stale display");return p>b&&L(a),b=p,se(a,_),_}}),u._shadow.set("display",E),o.includes("view")){const p=new u.constructor(2,u._module,null,{shadow:{}});p._shadow.set("display",E),p.define(["display"],_=>ae=>$.input(_(ae))),u._shadow.set("view",p)}}u.define(m.length?`cell ${t}`:null,o,g),y.push(u);for(const b of m)y.push(V.variable(!0).define(b,[`cell ${t}`],L=>L[b]))}n(K,"$"),i(K,"define");function F(){}n(F,"z"),i(F,"noop");function w(e){e._expanded&&(e._expanded=e._nodes.map(oe)),e._nodes.forEach(t=>t.remove()),e._nodes.length=0}n(w,"p"),i(w,"clear");function G(e,t){e._error&&(e._error=!1,w(e),t&&v(e,t))}n(G,"C"),i(G,"reset");function J(e,t){console.error(t),e._error=!0,w(e),v(e,z(t))}n(J,"F"),i(J,"reject");function U(e,t){return(e._root??=import("../_npm/react-dom@18.3.1/_esm.js").then(({createRoot:r})=>{const o=document.createElement("DIV");return[o,r(o)]})).then(([r,o])=>{r.parentNode||(e._nodes.push(r),e.parentNode.insertBefore(r,e)),o.render(t)})}n(U,"H"),i(U,"displayJsx");function v(e,t){if(t.nodeType===11){let r;for(;r=t.firstChild;)e._nodes.push(r),e.parentNode.insertBefore(r,e)}else e._nodes.push(t),e.parentNode.insertBefore(t,e)}n(v,"a"),i(v,"displayNode");function Z(e,t){if(C(t))v(e,t);else if(typeof t=="string"||!t?.[Symbol.iterator])v(e,document.createTextNode(t));else for(const r of t)v(e,C(r)?r:document.createTextNode(r))}n(Z,"J"),i(Z,"displayInline");function W(e,t){v(e,C(t)?t:M(t,e._expanded[e._nodes.length]))}n(W,"P"),i(W,"displayBlock");function at(e){w(k.get(e)),N.get(e).variables.forEach(t=>t.delete()),N.delete(e)}n(at,"Q"),i(at,"undefine");function C(e){return e instanceof Node&&e instanceof e.constructor}n(C,"N"),i(C,"isNode");function X(e){const t=new Map,r=document.createNodeIterator(e,128,null);let o;for(;o=r.nextNode();)Y(o)&&t.set(o.data.slice(1,-1),o);return t}n(X,"v"),i(X,"findRoots");function Y(e){return e.nodeType===8&&/^:[0-9a-f]{8}(?:-\d+)?:$/.test(e.data)}n(Y,"K"),i(Y,"isRoot");function ee(e){return e.nodeType===1&&e.tagName==="OBSERVABLEHQ-LOADING"}n(ee,"U"),i(ee,"isLoading");function te(e){const t=e.previousSibling;return t&&ee(t)?t:null}n(te,"B"),i(te,"findLoading");function it(e,t){t==null?k.delete(e):k.set(e,t)}n(it,"W"),i(it,"registerRoot");function oe(e){if(e.nodeType!==1||!e.classList.contains("observablehq"))return;const t=e.querySelectorAll(".observablehq--expanded");if(t.length)return Array.from(t,r=>re(e,r))}n(oe,"X"),i(oe,"getExpanded");function re(e,t){const r=[];for(;t!==e;)r.push(ne(t)),t=t.parentNode;return r.reverse()}n(re,"Y"),i(re,"getNodePath");function ne(e){return Array.prototype.indexOf.call(e.parentNode.childNodes,e)}n(ne,"Z"),i(ne,"getChildIndex");export{K as define};
|
|
|
1 |
+
var ie=Object.defineProperty;var n=(e,t)=>ie(e,"name",{value:t,configurable:!0});import{Inspector as j,Runtime as le}from"./runtime.c4c9c1af.js";import{Generators as $,resize as ce,FileAttachment as de,Mutable as pe}from"./stdlib.b89f0aee.js";var ue=Object.defineProperty,A=n((e,t)=>ue(e,"name",{value:t,configurable:!0}),"o$2");const B=document.createElement("template");B.innerHTML='<button title="Copy code" class="observablehq-pre-copy"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2"><path d="M2 6C2 5.44772 2.44772 5 3 5H10C10.5523 5 11 5.44772 11 6V13C11 13.5523 10.5523 14 10 14H3C2.44772 14 2 13.5523 2 13V6Z M4 2.00004L12 2.00001C13.1046 2 14 2.89544 14 4.00001V12"></path></svg></button>',O();function O(){for(const e of document.querySelectorAll("pre:not([data-copy=none])")){const t=e.parentNode;if(t.classList.contains("observablehq-pre-container"))continue;const r=t.insertBefore(document.createElement("div"),e);r.className="observablehq-pre-container",Object.assign(r.dataset,e.dataset),r.appendChild(B.content.cloneNode(!0).firstChild).addEventListener("click",D),r.appendChild(e)}}n(O,"r$2"),A(O,"enableCopyButtons");async function D({currentTarget:e}){await navigator.clipboard.writeText(e.nextElementSibling.textContent.trim());const[t]=e.getAnimations({subtree:!0});t&&(t.currentTime=0),e.classList.add("observablehq-pre-copied"),e.addEventListener("animationend",()=>e.classList.remove("observablehq-pre-copied"),{once:!0})}n(D,"c$3"),A(D,"copy");var me=Object.defineProperty,S=n((e,t)=>me(e,"name",{value:t,configurable:!0}),"s$2");const c=document.querySelector("#observablehq-sidebar-toggle");if(c){let e=c.indeterminate;const t=S(()=>matchMedia("(min-width: calc(640px + 6rem + 272px))").matches,"match");c.onclick=()=>{const o=t();e?(c.checked=!o,e=!1):c.checked===o&&(e=!0),c.indeterminate=e,e?sessionStorage.removeItem("observablehq-sidebar"):sessionStorage.setItem("observablehq-sidebar",c.checked)},addEventListener("keydown",o=>{o.code==="Escape"&&!t()&&(!c.indeterminate&&c.checked&&(o.target===document.body||o.target===c)||o.target?.closest("#observablehq-sidebar"))&&c.click()}),addEventListener("keypress",o=>{o.code==="KeyB"&&(o.metaKey||o.altKey)&&!o.ctrlKey&&(o.target===document.body||o.target===c||o.target?.closest("#observablehq-sidebar"))&&(c.click(),o.preventDefault())});const r=`Toggle sidebar ${/Mac|iPhone/.test(navigator.platform)?/Firefox/.test(navigator.userAgent)?"\u2325":"\u2318":"Alt-"}B`;for(const o of document.querySelectorAll("#observablehq-sidebar-toggle, label[for='observablehq-sidebar-toggle']"))o.title=r}function R(e){e.detail>1&&e.preventDefault()}n(R,"l$4"),S(R,"preventDoubleClick");function I(){sessionStorage.setItem(`observablehq-sidebar:${this.firstElementChild.textContent}`,this.open)}n(I,"c$2"),S(I,"persistOpen");for(const e of document.querySelectorAll("#observablehq-sidebar summary"))e.onmousedown=R,e.parentElement.ontoggle=I;var fe=Object.defineProperty,P=n((e,t)=>fe(e,"name",{value:t,configurable:!0}),"l$3");const x=document.querySelector("#observablehq-toc");if(x){const e=x.appendChild(document.createElement("div"));e.classList.add("observablehq-secondary-link-highlight");const t=document.querySelector("#observablehq-main"),r=Array.from(t.querySelectorAll(x.dataset.selector)).reverse(),o=x.querySelectorAll(".observablehq-secondary-link"),m=P(()=>{for(const a of o)a.classList.remove("observablehq-secondary-link-active");if(location.hash)for(const a of r){const f=encodeURI(`#${a.id}`);if(f===location.hash){const h=a.getBoundingClientRect().top;if(0<h&&h<40){for(const q of o)if(q.querySelector("a[href]")?.hash===f)return q.classList.add("observablehq-secondary-link-active"),q;return}break}}for(const a of r){if(a.getBoundingClientRect().top>=innerHeight*.5)continue;const f=a.querySelector("a[href]")?.hash;for(const h of o)if(h.querySelector("a[href]")?.hash===f)return h.classList.add("observablehq-secondary-link-active"),h;break}},"relink"),g=P(()=>{const a=m();e.style.cssText=a?`top: ${a.offsetTop}px; height: ${a.offsetHeight}px;`:""},"intersected"),y=new IntersectionObserver(g,{rootMargin:"0px 0px -50% 0px"});for(const a of r)y.observe(a)}var he=Object.defineProperty,T=n((e,t)=>he(e,"name",{value:t,configurable:!0}),"r$1");function M(e,t){const r=document.createElement("div");if(new j(r).fulfilled(e),t)for(const o of t){let m=r;for(const g of o)m=m?.childNodes[g];m?.dispatchEvent(new Event("mouseup"))}return r}n(M,"f$2"),T(M,"inspect");function z(e){const t=document.createElement("div");return new j(t).rejected(e),t.classList.add("observablehq--error"),t}n(z,"l$2"),T(z,"inspectError");var be=Object.defineProperty,s=n((e,t)=>be(e,"name",{value:t,configurable:!0}),"o");const ve=s(()=>import("../_npm/lodash@4.17.21/_esm.js").then(e=>e.default),"_"),ge=s(()=>import("../_npm/arquero@7.1.0/_esm.js"),"aq"),ye=s(()=>import("../_npm/apache-arrow@17.0.0/_esm.js"),"Arrow"),qe=s(()=>import("../_npm/d3@7.9.0/7055d4c5.js"),"d3"),$e=s(()=>import("./stdlib/dot.js").then(e=>e.default),"dot"),we=s(()=>import("../_npm/@duckdb/duckdb-wasm@1.28.0/_esm.js"),"duckdb"),_e=s(()=>import("./stdlib/duckdb.js").then(e=>e.DuckDBClient),"DuckDBClient"),xe=s(()=>import("../_npm/echarts@5.5.1/dist/echarts.esm.min.js._esm.js"),"echarts"),ke=s(()=>import("../_npm/htl@0.3.1/_esm.js"),"htl"),Ce=s(()=>import("../_npm/htl@0.3.1/_esm.js").then(e=>e.html),"html"),Le=s(()=>import("../_npm/htl@0.3.1/_esm.js").then(e=>e.svg),"svg"),Ee=s(()=>import("./stdlib/inputs.js"),"Inputs"),Se=s(()=>import("../_npm/leaflet@1.9.4/_esm.js"),"L"),Ne=s(()=>import("../_npm/mapbox-gl@3.6.0/_esm.js").then(e=>e.default),"mapboxgl"),je=s(()=>import("./stdlib/mermaid.js").then(e=>e.default),"mermaid"),Ae=s(()=>import("../_npm/@observablehq/plot@0.6.16/e828d8c8.js"),"Plot"),Be=s(()=>import("../_npm/react@18.3.1/_esm.js"),"React"),Oe=s(()=>import("../_npm/react-dom@18.3.1/_esm.js"),"ReactDOM"),De=s(()=>import("./stdlib/duckdb.js").then(e=>e.sql),"sql"),Re=s(()=>import("./stdlib/sqlite.js").then(e=>e.default),"SQLite"),Ie=s(()=>import("./stdlib/sqlite.js").then(e=>e.SQLiteDatabaseClient),"SQLiteDatabaseClient"),Pe=s(()=>import("./stdlib/tex.js").then(e=>e.default),"tex"),Te=s(()=>import("../_npm/topojson-client@3.1.0/_esm.js"),"topojson"),Me=s(()=>import("./stdlib/vgplot.js").then(e=>e.default()),"vg"),ze=s(()=>import("./stdlib/vega-lite.js").then(e=>e.default),"vl");var Qe=Object.freeze({__proto__:null,Arrow:ye,DuckDBClient:_e,Inputs:Ee,L:Se,Plot:Ae,React:Be,ReactDOM:Oe,SQLite:Re,SQLiteDatabaseClient:Ie,_:ve,aq:ge,d3:qe,dot:$e,duckdb:we,echarts:xe,htl:ke,html:Ce,mapboxgl:Ne,mermaid:je,sql:De,svg:Le,tex:Pe,topojson:Te,vg:Me,vl:ze}),He=Object.defineProperty,l=n((e,t)=>He(e,"name",{value:t,configurable:!0}),"e");const Ve=l(()=>d(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/aapl.csv"),!0),"aapl"),Ke=l(()=>d(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/alphabet.csv"),!0),"alphabet"),Fe=l(()=>d(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/cars.csv"),!0),"cars"),Ge=l(()=>d(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/citywages.csv"),!0),"citywages"),Je=l(()=>d(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/diamonds.csv"),!0),"diamonds"),Ue=l(()=>d(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/flare.csv"),!0),"flare"),Ze=l(()=>d(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/industries.csv"),!0),"industries"),We=l(()=>Q(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/miserables.json")),"miserables"),Xe=l(()=>d(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/olympians.csv"),!0),"olympians"),Ye=l(()=>d(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/penguins.csv"),!0),"penguins"),et=l(()=>d(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/pizza.csv"),!0),"pizza"),tt=l(()=>d(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/weather.csv"),!0),"weather");async function Q(e){const t=await fetch(e);if(!t.ok)throw new Error(`unable to fetch ${e}: status ${t.status}`);return t.json()}n(Q,"w$1"),l(Q,"json");async function H(e){const t=await fetch(e);if(!t.ok)throw new Error(`unable to fetch ${e}: status ${t.status}`);return t.text()}n(H,"y"),l(H,"text");async function d(e,t){const[r,o]=await Promise.all([H(e),import("../_npm/d3-dsv@3.0.1/407f7a1f.js")]);return o.csvParse(r,t&&o.autoType)}n(d,"t"),l(d,"csv");var ot=Object.freeze({__proto__:null,aapl:Ve,alphabet:Ke,cars:Fe,citywages:Ge,diamonds:Je,flare:Ue,industries:Ze,miserables:We,olympians:Xe,penguins:Ye,pizza:et,weather:tt}),rt=Object.defineProperty,i=n((e,t)=>rt(e,"name",{value:t,configurable:!0}),"i");const nt={now:()=>$.now(),width:()=>$.width(document.querySelector("main")),dark:()=>$.dark(),resize:()=>ce,FileAttachment:()=>de,Generators:()=>$,Mutable:()=>pe,...Qe,...ot},st=new le(nt),V=st.module(),N=new Map,k=X(document.body);function K(e){const{id:t,mode:r,inputs:o=[],outputs:m=[],body:g}=e,y=[];N.set(t,{cell:e,variables:y});const a=k.get(t),f=te(a);a._nodes=[],r===void 0&&(a._expanded=[]),f&&a._nodes.push(f);const h=i(()=>G(a,f),"pending"),q=i(b=>J(a,b),"rejected"),u=V.variable({_node:a.parentNode,pending:h,rejected:q},{shadow:{}});if(o.includes("display")||o.includes("view")){let b=-1;const L=r==="jsx"?F:w,se=r==="inline"?Z:r==="jsx"?U:W,E=new u.constructor(2,u._module);if(E.define(o.filter(p=>p!=="display"&&p!=="view"),()=>{let p=u._version;return _=>{if(p<b)throw new Error("stale display");return p>b&&L(a),b=p,se(a,_),_}}),u._shadow.set("display",E),o.includes("view")){const p=new u.constructor(2,u._module,null,{shadow:{}});p._shadow.set("display",E),p.define(["display"],_=>ae=>$.input(_(ae))),u._shadow.set("view",p)}}u.define(m.length?`cell ${t}`:null,o,g),y.push(u);for(const b of m)y.push(V.variable(!0).define(b,[`cell ${t}`],L=>L[b]))}n(K,"$"),i(K,"define");function F(){}n(F,"z"),i(F,"noop");function w(e){e._expanded&&(e._expanded=e._nodes.map(oe)),e._nodes.forEach(t=>t.remove()),e._nodes.length=0}n(w,"p"),i(w,"clear");function G(e,t){e._error&&(e._error=!1,w(e),t&&v(e,t))}n(G,"C"),i(G,"reset");function J(e,t){console.error(t),e._error=!0,w(e),v(e,z(t))}n(J,"F"),i(J,"reject");function U(e,t){return(e._root??=import("../_npm/react-dom@18.3.1/_esm.js").then(({createRoot:r})=>{const o=document.createElement("DIV");return[o,r(o)]})).then(([r,o])=>{r.parentNode||(e._nodes.push(r),e.parentNode.insertBefore(r,e)),o.render(t)})}n(U,"H"),i(U,"displayJsx");function v(e,t){if(t.nodeType===11){let r;for(;r=t.firstChild;)e._nodes.push(r),e.parentNode.insertBefore(r,e)}else e._nodes.push(t),e.parentNode.insertBefore(t,e)}n(v,"a"),i(v,"displayNode");function Z(e,t){if(C(t))v(e,t);else if(typeof t=="string"||!t?.[Symbol.iterator])v(e,document.createTextNode(t));else for(const r of t)v(e,C(r)?r:document.createTextNode(r))}n(Z,"J"),i(Z,"displayInline");function W(e,t){v(e,C(t)?t:M(t,e._expanded[e._nodes.length]))}n(W,"P"),i(W,"displayBlock");function at(e){w(k.get(e)),N.get(e).variables.forEach(t=>t.delete()),N.delete(e)}n(at,"Q"),i(at,"undefine");function C(e){return e instanceof Node&&e instanceof e.constructor}n(C,"N"),i(C,"isNode");function X(e){const t=new Map,r=document.createNodeIterator(e,128,null);let o;for(;o=r.nextNode();)Y(o)&&t.set(o.data.slice(1,-1),o);return t}n(X,"v"),i(X,"findRoots");function Y(e){return e.nodeType===8&&/^:[0-9a-f]{8}(?:-\d+)?:$/.test(e.data)}n(Y,"K"),i(Y,"isRoot");function ee(e){return e.nodeType===1&&e.tagName==="OBSERVABLEHQ-LOADING"}n(ee,"U"),i(ee,"isLoading");function te(e){const t=e.previousSibling;return t&&ee(t)?t:null}n(te,"B"),i(te,"findLoading");function it(e,t){t==null?k.delete(e):k.set(e,t)}n(it,"W"),i(it,"registerRoot");function oe(e){if(e.nodeType!==1||!e.classList.contains("observablehq"))return;const t=e.querySelectorAll(".observablehq--expanded");if(t.length)return Array.from(t,r=>re(e,r))}n(oe,"X"),i(oe,"getExpanded");function re(e,t){const r=[];for(;t!==e;)r.push(ne(t)),t=t.parentNode;return r.reverse()}n(re,"Y"),i(re,"getNodePath");function ne(e){return Array.prototype.indexOf.call(e.parentNode.childNodes,e)}n(ne,"Z"),i(ne,"getChildIndex");export{K as define};
|
_observablehq/{runtime.3f7f73d9.js β runtime.c4c9c1af.js}
RENAMED
@@ -1,4 +1,4 @@
|
|
1 |
-
var Ft=Object.defineProperty;var r=(e,t)=>Ft(e,"name",{value:t,configurable:!0});var B,H;import{FileAttachments as Rt,Library as Ut}from"./stdlib.
|
2 |
<path d='M4 7L0 1h8z' fill='currentColor' />
|
3 |
</svg>`,p.appendChild(document.createTextNode(`${a}${l?" [":" {"}`)),p.addEventListener("mouseup",function(d){d.stopPropagation(),D(c,Y(e,null,n,i))}),o=o(e);for(let d=0;!(s=o.next()).done&&d<20;++d)c.appendChild(s.value);if(!s.done){const d=c.appendChild(document.createElement("a"));d.className="observablehq--field",d.style.display="block",d.appendChild(document.createTextNode(" \u2026 more")),d.addEventListener("mouseup",function(S){S.stopPropagation(),c.insertBefore(s.value,c.lastChild.previousSibling);for(let O=0;!(s=o.next()).done&&O<19;++O)c.insertBefore(s.value,c.lastChild.previousSibling);s.done&&c.removeChild(c.lastChild.previousSibling),A(c,"load")})}return c.appendChild(document.createTextNode(l?"]":"}")),c}r(oe,"F$2"),b(oe,"inspectExpanded");function*ge(e){for(const[t,n]of e)yield Ne(t,n);yield*P(e)}r(ge,"A$3"),b(ge,"iterateMap");function*$e(e){for(const t of e)yield se(t);yield*P(e)}r($e,"B$1"),b($e,"iterateSet");function*we(e){for(const t of e)yield se(t)}r(we,"D$5"),b(we,"iterateImSet");function*Ce(e){for(let t=0,n=e.length;t<n;++t)t in e&&(yield $(t,_(e,t),"observablehq--index"));for(const t in e)!te(t)&&L(e,t)&&(yield $(t,_(e,t),"observablehq--key"));for(const t of k(e))yield $(j(t),_(e,t),"observablehq--symbol")}r(Ce,"H$1"),b(Ce,"iterateArray");function*Ee(e){let t=0;for(const n=e.size;t<n;++t)yield $(t,e.get(t),!0)}r(Ee,"R$2"),b(Ee,"iterateImArray");function*xe(e){for(const n in on(e))yield $(n,_(e,n),"observablehq--key");for(const n of k(e))yield $(j(n),_(e,n),"observablehq--symbol");const t=ie(e);t&&t!==ye&&(yield ae(t))}r(xe,"_"),b(xe,"iterateProto");function*P(e){for(const n in e)L(e,n)&&(yield $(n,_(e,n),"observablehq--key"));for(const n of k(e))yield $(j(n),_(e,n),"observablehq--symbol");const t=ie(e);t&&t!==ye&&(yield ae(t))}r(P,"h$4"),b(P,"iterateObject");function*Se(e){for(const[t,n]of e)yield $(t,n,"observablehq--key")}r(Se,"G$1"),b(Se,"iterateImObject");function ae(e){const t=document.createElement("div"),n=t.appendChild(document.createElement("span"));return t.className="observablehq--field",n.className="observablehq--prototype-key",n.textContent=" <prototype>",t.appendChild(document.createTextNode(": ")),t.appendChild(h(e,void 0,void 0,void 0,!0)),t}r(ae,"E$1"),b(ae,"formatPrototype");function $(e,t,n){const i=document.createElement("div"),l=i.appendChild(document.createElement("span"));return i.className="observablehq--field",l.className=n,l.textContent=` ${e}`,i.appendChild(document.createTextNode(": ")),i.appendChild(h(t)),i}r($,"s$2"),b($,"formatField");function Ne(e,t){const n=document.createElement("div");return n.className="observablehq--field",n.appendChild(document.createTextNode(" ")),n.appendChild(h(e)),n.appendChild(document.createTextNode(" => ")),n.appendChild(h(t)),n}r(Ne,"J$1"),b(Ne,"formatMapField");function se(e){const t=document.createElement("div");return t.className="observablehq--field",t.appendChild(document.createTextNode(" ")),t.appendChild(h(e)),t}r(se,"k$2"),b(se,"formatSetField");var an=Object.defineProperty,v=r((e,t)=>an(e,"name",{value:t,configurable:!0}),"a$3");function le(e){const t=window.getSelection();return t.type==="Range"&&(t.containsNode(e,!0)||e.contains(t.anchorNode)||e.contains(t.focusNode))}r(le,"q$1"),v(le,"hasSelection");function Y(e,t,n,i){let l=ee(e),a,o,s,u;if(e instanceof Map?e instanceof e.constructor?(a=`Map(${e.size})`,o=Oe):(a="Map()",o=q):e instanceof Set?e instanceof e.constructor?(a=`Set(${e.size})`,o=je):(a="Set()",o=q):l?(a=`${e.constructor.name}(${e.length})`,o=Me):(u=re(e))?(a=`Immutable.${u.name}${u.name==="Record"?"":`(${e.size})`}`,l=u.arrayish,o=u.arrayish?qe:u.setish?Pe:Te):(a=V(e),o=q),t){const d=document.createElement("span");return d.className="observablehq--shallow",n&&d.appendChild(g(n)),d.appendChild(document.createTextNode(a)),d.addEventListener("mouseup",function(S){le(d)||(S.stopPropagation(),D(d,Y(e)))}),d}const c=document.createElement("span");c.className="observablehq--collapsed",n&&c.appendChild(g(n));const p=c.appendChild(document.createElement("a"));p.innerHTML=`<svg width=8 height=8 class='observablehq--caret'>
|
4 |
<path d='M7 4L1 8V0z' fill='currentColor' />
|
|
|
1 |
+
var Ft=Object.defineProperty;var r=(e,t)=>Ft(e,"name",{value:t,configurable:!0});var B,H;import{FileAttachments as Rt,Library as Ut}from"./stdlib.b89f0aee.js";var zt=Object.defineProperty,Bt=r((e,t)=>zt(e,"name",{value:t,configurable:!0}),"c$7");function A(e,t,n){n=n||{};var i=e.ownerDocument,l=i.defaultView.CustomEvent;typeof l=="function"?l=new l(t,{detail:n}):(l=i.createEvent("Event"),l.initEvent(t,!1,!1),l.detail=n),e.dispatchEvent(l)}r(A,"o$c"),Bt(A,"dispatch");var Ht=Object.defineProperty,be=r((e,t)=>Ht(e,"name",{value:t,configurable:!0}),"r$7");function ee(e){return Array.isArray(e)||e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array}r(ee,"o$b"),be(ee,"isarray");function te(e){return e===(e|0)+""}r(te,"s$4"),be(te,"isindex");var Vt=Object.defineProperty,Yt=r((e,t)=>Vt(e,"name",{value:t,configurable:!0}),"n$8");function g(e){const t=document.createElement("span");return t.className="observablehq--cellname",t.textContent=`${e} = `,t}r(g,"c$6"),Yt(g,"inspectName");var Gt=Object.defineProperty,Jt=r((e,t)=>Gt(e,"name",{value:t,configurable:!0}),"t$8");const Kt=Symbol.prototype.toString;function j(e){return Kt.call(e)}r(j,"e$6"),Jt(j,"formatSymbol");var Zt=Object.defineProperty,ne=r((e,t)=>Zt(e,"name",{value:t,configurable:!0}),"n$6");const{getOwnPropertySymbols:Xt,prototype:{hasOwnProperty:Qt}}=Object,{toStringTag:Wt}=Symbol,ve={},k=Xt;function L(e,t){return Qt.call(e,t)}r(L,"i$5"),ne(L,"isown");function V(e){return e[Wt]||e.constructor&&e.constructor.name||"Object"}r(V,"l$1"),ne(V,"tagof");function _(e,t){try{const n=e[t];return n&&n.constructor,n}catch{return ve}}r(_,"y$2"),ne(_,"valueof");var en=Object.defineProperty,tn=r((e,t)=>en(e,"name",{value:t,configurable:!0}),"i$4");const nn=[{symbol:"@@__IMMUTABLE_INDEXED__@@",name:"Indexed",modifier:!0},{symbol:"@@__IMMUTABLE_KEYED__@@",name:"Keyed",modifier:!0},{symbol:"@@__IMMUTABLE_LIST__@@",name:"List",arrayish:!0},{symbol:"@@__IMMUTABLE_MAP__@@",name:"Map"},{symbol:"@@__IMMUTABLE_ORDERED__@@",name:"Ordered",modifier:!0,prefix:!0},{symbol:"@@__IMMUTABLE_RECORD__@@",name:"Record"},{symbol:"@@__IMMUTABLE_SET__@@",name:"Set",arrayish:!0,setish:!0},{symbol:"@@__IMMUTABLE_STACK__@@",name:"Stack",arrayish:!0}];function re(e){try{let t=nn.filter(({symbol:o})=>e[o]===!0);if(!t.length)return;const n=t.find(o=>!o.modifier),i=n.name==="Map"&&t.find(o=>o.modifier&&o.prefix),l=t.some(o=>o.arrayish),a=t.some(o=>o.setish);return{name:`${i?i.name:""}${n.name}`,symbols:t,arrayish:l&&!a,setish:a}}catch{return null}}r(re,"y$1"),tn(re,"immutableName");var rn=Object.defineProperty,b=r((e,t)=>rn(e,"name",{value:t,configurable:!0}),"i$3");const{getPrototypeOf:ie,getOwnPropertyDescriptors:on}=Object,ye=ie({});function oe(e,t,n,i){let l=ee(e),a,o,s,u;e instanceof Map?e instanceof e.constructor?(a=`Map(${e.size})`,o=ge):(a="Map()",o=P):e instanceof Set?e instanceof e.constructor?(a=`Set(${e.size})`,o=$e):(a="Set()",o=P):l?(a=`${e.constructor.name}(${e.length})`,o=Ce):(u=re(e))?(a=`Immutable.${u.name}${u.name==="Record"?"":`(${e.size})`}`,l=u.arrayish,o=u.arrayish?Ee:u.setish?we:Se):i?(a=V(e),o=xe):(a=V(e),o=P);const c=document.createElement("span");c.className="observablehq--expanded",n&&c.appendChild(g(n));const p=c.appendChild(document.createElement("a"));p.innerHTML=`<svg width=8 height=8 class='observablehq--caret'>
|
2 |
<path d='M4 7L0 1h8z' fill='currentColor' />
|
3 |
</svg>`,p.appendChild(document.createTextNode(`${a}${l?" [":" {"}`)),p.addEventListener("mouseup",function(d){d.stopPropagation(),D(c,Y(e,null,n,i))}),o=o(e);for(let d=0;!(s=o.next()).done&&d<20;++d)c.appendChild(s.value);if(!s.done){const d=c.appendChild(document.createElement("a"));d.className="observablehq--field",d.style.display="block",d.appendChild(document.createTextNode(" \u2026 more")),d.addEventListener("mouseup",function(S){S.stopPropagation(),c.insertBefore(s.value,c.lastChild.previousSibling);for(let O=0;!(s=o.next()).done&&O<19;++O)c.insertBefore(s.value,c.lastChild.previousSibling);s.done&&c.removeChild(c.lastChild.previousSibling),A(c,"load")})}return c.appendChild(document.createTextNode(l?"]":"}")),c}r(oe,"F$2"),b(oe,"inspectExpanded");function*ge(e){for(const[t,n]of e)yield Ne(t,n);yield*P(e)}r(ge,"A$3"),b(ge,"iterateMap");function*$e(e){for(const t of e)yield se(t);yield*P(e)}r($e,"B$1"),b($e,"iterateSet");function*we(e){for(const t of e)yield se(t)}r(we,"D$5"),b(we,"iterateImSet");function*Ce(e){for(let t=0,n=e.length;t<n;++t)t in e&&(yield $(t,_(e,t),"observablehq--index"));for(const t in e)!te(t)&&L(e,t)&&(yield $(t,_(e,t),"observablehq--key"));for(const t of k(e))yield $(j(t),_(e,t),"observablehq--symbol")}r(Ce,"H$1"),b(Ce,"iterateArray");function*Ee(e){let t=0;for(const n=e.size;t<n;++t)yield $(t,e.get(t),!0)}r(Ee,"R$2"),b(Ee,"iterateImArray");function*xe(e){for(const n in on(e))yield $(n,_(e,n),"observablehq--key");for(const n of k(e))yield $(j(n),_(e,n),"observablehq--symbol");const t=ie(e);t&&t!==ye&&(yield ae(t))}r(xe,"_"),b(xe,"iterateProto");function*P(e){for(const n in e)L(e,n)&&(yield $(n,_(e,n),"observablehq--key"));for(const n of k(e))yield $(j(n),_(e,n),"observablehq--symbol");const t=ie(e);t&&t!==ye&&(yield ae(t))}r(P,"h$4"),b(P,"iterateObject");function*Se(e){for(const[t,n]of e)yield $(t,n,"observablehq--key")}r(Se,"G$1"),b(Se,"iterateImObject");function ae(e){const t=document.createElement("div"),n=t.appendChild(document.createElement("span"));return t.className="observablehq--field",n.className="observablehq--prototype-key",n.textContent=" <prototype>",t.appendChild(document.createTextNode(": ")),t.appendChild(h(e,void 0,void 0,void 0,!0)),t}r(ae,"E$1"),b(ae,"formatPrototype");function $(e,t,n){const i=document.createElement("div"),l=i.appendChild(document.createElement("span"));return i.className="observablehq--field",l.className=n,l.textContent=` ${e}`,i.appendChild(document.createTextNode(": ")),i.appendChild(h(t)),i}r($,"s$2"),b($,"formatField");function Ne(e,t){const n=document.createElement("div");return n.className="observablehq--field",n.appendChild(document.createTextNode(" ")),n.appendChild(h(e)),n.appendChild(document.createTextNode(" => ")),n.appendChild(h(t)),n}r(Ne,"J$1"),b(Ne,"formatMapField");function se(e){const t=document.createElement("div");return t.className="observablehq--field",t.appendChild(document.createTextNode(" ")),t.appendChild(h(e)),t}r(se,"k$2"),b(se,"formatSetField");var an=Object.defineProperty,v=r((e,t)=>an(e,"name",{value:t,configurable:!0}),"a$3");function le(e){const t=window.getSelection();return t.type==="Range"&&(t.containsNode(e,!0)||e.contains(t.anchorNode)||e.contains(t.focusNode))}r(le,"q$1"),v(le,"hasSelection");function Y(e,t,n,i){let l=ee(e),a,o,s,u;if(e instanceof Map?e instanceof e.constructor?(a=`Map(${e.size})`,o=Oe):(a="Map()",o=q):e instanceof Set?e instanceof e.constructor?(a=`Set(${e.size})`,o=je):(a="Set()",o=q):l?(a=`${e.constructor.name}(${e.length})`,o=Me):(u=re(e))?(a=`Immutable.${u.name}${u.name==="Record"?"":`(${e.size})`}`,l=u.arrayish,o=u.arrayish?qe:u.setish?Pe:Te):(a=V(e),o=q),t){const d=document.createElement("span");return d.className="observablehq--shallow",n&&d.appendChild(g(n)),d.appendChild(document.createTextNode(a)),d.addEventListener("mouseup",function(S){le(d)||(S.stopPropagation(),D(d,Y(e)))}),d}const c=document.createElement("span");c.className="observablehq--collapsed",n&&c.appendChild(g(n));const p=c.appendChild(document.createElement("a"));p.innerHTML=`<svg width=8 height=8 class='observablehq--caret'>
|
4 |
<path d='M7 4L1 8V0z' fill='currentColor' />
|
_observablehq/{stdlib.2229c972.js β stdlib.b89f0aee.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
var S=Object.defineProperty;var i=(t,e)=>S(t,"name",{value:e,configurable:!0});var f,m,d,D=Object.defineProperty,u=i((t,e)=>D(t,"name",{value:e,configurable:!0}),"o$3");const b=new Map;function O(t,e){const r=new URL(t,location).href;if(e==null)b.delete(r);else{const{path:n,mimeType:a,lastModified:o,size:s}=e,v=new g(new URL(n,location).href,t.split("/").pop(),a,o,s);b.set(r,v)}}i(O,"d$2"),u(O,"registerFile");function w(t,e=location){if(new.target!==void 0)throw new TypeError("FileAttachment is not a constructor");const r=b.get(new URL(t,e).href);if(!r)throw new Error(`File not found: ${t}`);return r}i(w,"p$1"),u(w,"FileAttachment");async function c(t){const e=await fetch(await t.url());if(!e.ok)throw new Error(`Unable to load file: ${t.name}`);return e}i(c,"n$1"),u(c,"remote_fetch");const j=(f=class{constructor(e,r="application/octet-stream",n,a){Object.defineProperties(this,{name:{value:`${e}`,enumerable:!0},mimeType:{value:`${r}`,enumerable:!0},lastModified:{value:+n,enumerable:!0},size:{value:+a,enumerable:!0}})}async blob(){return(await c(this)).blob()}async arrayBuffer(){return(await c(this)).arrayBuffer()}async text(e){return e===void 0?(await c(this)).text():new TextDecoder(e).decode(await this.arrayBuffer())}async json(){return(await c(this)).json()}async stream(){return(await c(this)).body}async dsv({delimiter:e=",",array:r=!1,typed:n=!1}={}){const[a,o]=await Promise.all([this.text(),import("../_npm/d3-dsv@3.0.1/407f7a1f.js")]),s=o.dsvFormat(e);return(r?s.parseRows:s.parse)(a,n&&o.autoType)}async csv(e){return this.dsv({...e,delimiter:","})}async tsv(e){return this.dsv({...e,delimiter:" "})}async image(e){const r=await this.url();return new Promise((n,a)=>{const o=new Image;new URL(r,document.baseURI).origin!==new URL(location).origin&&(o.crossOrigin="anonymous"),Object.assign(o,e),o.onload=()=>n(o),o.onerror=()=>a(new Error(`Unable to load file: ${this.name}`)),o.src=r})}async arrow(){const[e,r]=await Promise.all([import("../_npm/apache-arrow@17.0.0/_esm.js"),c(this)]);return e.tableFromIPC(r)}async arquero(e){let r,n;switch(this.mimeType){case"application/json":r=this.text(),n="fromJSON";break;case"text/tab-separated-values":e?.delimiter===void 0&&(e={...e,delimiter:" "});case"text/csv":r=this.text(),n="fromCSV";break;default:if(/\.arrow$/i.test(this.name))r=this.arrow(),n="fromArrow";else if(/\.parquet$/i.test(this.name))r=this.parquet(),n="fromArrow";else throw new Error(`unable to determine Arquero loader: ${this.name}`);break}const[a,o]=await Promise.all([import("../_npm/arquero@7.
|
|
|
1 |
+
var S=Object.defineProperty;var i=(t,e)=>S(t,"name",{value:e,configurable:!0});var f,m,d,D=Object.defineProperty,u=i((t,e)=>D(t,"name",{value:e,configurable:!0}),"o$3");const b=new Map;function O(t,e){const r=new URL(t,location).href;if(e==null)b.delete(r);else{const{path:n,mimeType:a,lastModified:o,size:s}=e,v=new g(new URL(n,location).href,t.split("/").pop(),a,o,s);b.set(r,v)}}i(O,"d$2"),u(O,"registerFile");function w(t,e=location){if(new.target!==void 0)throw new TypeError("FileAttachment is not a constructor");const r=b.get(new URL(t,e).href);if(!r)throw new Error(`File not found: ${t}`);return r}i(w,"p$1"),u(w,"FileAttachment");async function c(t){const e=await fetch(await t.url());if(!e.ok)throw new Error(`Unable to load file: ${t.name}`);return e}i(c,"n$1"),u(c,"remote_fetch");const j=(f=class{constructor(e,r="application/octet-stream",n,a){Object.defineProperties(this,{name:{value:`${e}`,enumerable:!0},mimeType:{value:`${r}`,enumerable:!0},lastModified:{value:+n,enumerable:!0},size:{value:+a,enumerable:!0}})}async blob(){return(await c(this)).blob()}async arrayBuffer(){return(await c(this)).arrayBuffer()}async text(e){return e===void 0?(await c(this)).text():new TextDecoder(e).decode(await this.arrayBuffer())}async json(){return(await c(this)).json()}async stream(){return(await c(this)).body}async dsv({delimiter:e=",",array:r=!1,typed:n=!1}={}){const[a,o]=await Promise.all([this.text(),import("../_npm/d3-dsv@3.0.1/407f7a1f.js")]),s=o.dsvFormat(e);return(r?s.parseRows:s.parse)(a,n&&o.autoType)}async csv(e){return this.dsv({...e,delimiter:","})}async tsv(e){return this.dsv({...e,delimiter:" "})}async image(e){const r=await this.url();return new Promise((n,a)=>{const o=new Image;new URL(r,document.baseURI).origin!==new URL(location).origin&&(o.crossOrigin="anonymous"),Object.assign(o,e),o.onload=()=>n(o),o.onerror=()=>a(new Error(`Unable to load file: ${this.name}`)),o.src=r})}async arrow(){const[e,r]=await Promise.all([import("../_npm/apache-arrow@17.0.0/_esm.js"),c(this)]);return e.tableFromIPC(r)}async arquero(e){let r,n;switch(this.mimeType){case"application/json":r=this.text(),n="fromJSON";break;case"text/tab-separated-values":e?.delimiter===void 0&&(e={...e,delimiter:" "});case"text/csv":r=this.text(),n="fromCSV";break;default:if(/\.arrow$/i.test(this.name))r=this.arrow(),n="fromArrow";else if(/\.parquet$/i.test(this.name))r=this.parquet(),n="fromArrow";else throw new Error(`unable to determine Arquero loader: ${this.name}`);break}const[a,o]=await Promise.all([import("../_npm/arquero@7.1.0/_esm.js"),r]);return a[n](o,e)}async parquet(){const[e,r,n]=await Promise.all([import("../_npm/apache-arrow@17.0.0/_esm.js"),import("../_npm/parquet-wasm@0.6.1/_esm.js").then(async a=>(await a.default(import.meta.resolve("../_npm/parquet-wasm@0.6.1/esm/parquet_wasm_bg.wasm")),a)),this.arrayBuffer()]);return e.tableFromIPC(r.readParquet(new Uint8Array(n)).intoIPCStream())}async sqlite(){const[{SQLiteDatabaseClient:e},r]=await Promise.all([import("./stdlib/sqlite.js"),this.arrayBuffer()]);return e.open(r)}async zip(){const[{ZipArchive:e},r]=await Promise.all([import("./stdlib/zip.js"),this.arrayBuffer()]);return e.from(r)}async xml(e="application/xml"){return new DOMParser().parseFromString(await this.text(),e)}async html(){return this.xml("text/html")}async xlsx(){const[{Workbook:e},r]=await Promise.all([import("./stdlib/xlsx.js"),this.arrayBuffer()]);return e.load(r)}},i(f,"f"),f);u(j,"AbstractFile");let x=j;const A=(m=class extends x{constructor(e,r,n,a,o){super(r,n,a,o),Object.defineProperty(this,"href",{value:e})}async url(){return this.href}},i(m,"w"),m);u(A,"FileAttachmentImpl");let g=A;Object.defineProperty(g,"name",{value:"FileAttachment"}),w.prototype=g.prototype;var _=Object.defineProperty,N=i((t,e)=>_(t,"name",{value:e,configurable:!0}),"r$3");async function*l(t){let e,r,n=!1;const a=t(o=>(r=o,e?(e(o),e=null):n=!0,o));if(a!=null&&typeof a!="function")throw new Error(typeof a.then=="function"?"async initializers are not supported":"initializer returned something, but not a dispose function");try{for(;;)yield n?(n=!1,r):new Promise(o=>e=o)}finally{a?.()}}i(l,"u"),N(l,"observe");var V=Object.defineProperty,F=i((t,e)=>V(t,"name",{value:e,configurable:!0}),"o$2");function k(){return l(t=>{let e;const r=matchMedia("(prefers-color-scheme: dark)"),n=F(()=>{const a=getComputedStyle(document.body).getPropertyValue("color-scheme")==="dark";e!==a&&t(e=a)},"changed");return n(),r.addEventListener("change",n),()=>r.removeEventListener("change",n)})}i(k,"m"),F(k,"dark");var G=Object.defineProperty,y=i((t,e)=>G(t,"name",{value:e,configurable:!0}),"e$2");function E(t){return l(e=>{const r=z(t);let n=$(t);const a=y(()=>e($(t)),"inputted");return t.addEventListener(r,a),n!==void 0&&e(n),()=>t.removeEventListener(r,a)})}i(E,"o$1"),y(E,"input");function $(t){switch(t.type){case"range":case"number":return t.valueAsNumber;case"date":return t.valueAsDate;case"checkbox":return t.checked;case"file":return t.multiple?t.files:t.files[0];case"select-multiple":return Array.from(t.selectedOptions,e=>e.value);default:return t.value}}i($,"a"),y($,"valueof");function z(t){switch(t.type){case"button":case"submit":case"checkbox":return"click";case"file":return"change";default:return"input"}}i(z,"f$2"),y(z,"eventof");var J=Object.defineProperty,Q=i((t,e)=>J(t,"name",{value:e,configurable:!0}),"e$1");async function*L(){for(;;)yield Date.now()}i(L,"i$3"),Q(L,"now");var W=Object.defineProperty,Z=i((t,e)=>W(t,"name",{value:e,configurable:!0}),"r$2");async function*q(t){let e;const r=[],n=t(a=>(r.push(a),e&&(e(r.shift()),e=null),a));if(n!=null&&typeof n!="function")throw new Error(typeof n.then=="function"?"async initializers are not supported":"initializer returned something, but not a dispose function");try{for(;;)yield r.length?r.shift():new Promise(a=>e=a)}finally{n?.()}}i(q,"l"),Z(q,"queue");var H=Object.defineProperty,K=i((t,e)=>H(t,"name",{value:e,configurable:!0}),"i$2");function R(t,e){return l(r=>{let n;const a=new ResizeObserver(([o])=>{const s=o.contentRect.width;s!==n&&r(n=s)});return a.observe(t,e),()=>a.disconnect()})}i(R,"d"),K(R,"width");var X=Object.freeze({__proto__:null,dark:k,input:E,now:L,observe:l,queue:q,width:R}),Y=Object.defineProperty,ee=i((t,e)=>Y(t,"name",{value:e,configurable:!0}),"r$1");function U(t){let e;return Object.defineProperty(l(r=>{e=r,t!==void 0&&e(t)}),"value",{get:()=>t,set:r=>void e(t=r)})}i(U,"f$1"),ee(U,"Mutable");var te=Object.defineProperty,C=i((t,e)=>te(t,"name",{value:e,configurable:!0}),"r");function B(t,e){const r=document.createElement("div");r.style.position="relative",t.length!==1&&(r.style.height="100%");let n=0,a=0,o;const s=new ResizeObserver(async([v])=>{const{width:p,height:I}=v.contentRect;if(t.length===1&&p===o)return;o=p;const P=++n,h=p>0?await t(p,I):null;if(!(a>P)){for(a=P;r.lastChild;)r.lastChild.remove();h!=null&&(t.length!==1&&M(h)&&(h.style.position="absolute"),r.append(h))}});return s.observe(r),e?.then(()=>s.disconnect()),r}i(B,"p"),C(B,"resize");function M(t){return typeof t=="object"&&t.nodeType===1}i(M,"v"),C(M,"isElement");var re=Object.defineProperty,ne=i((t,e)=>re(t,"name",{value:e,configurable:!0}),"o");const T=(d=class{},i(d,"e"),d);ne(T,"Library");let ae=T;const ie=void 0;export{x as AbstractFile,w as FileAttachment,ie as FileAttachments,X as Generators,ae as Library,U as Mutable,O as registerFile,B as resize};
|
index.html
CHANGED
@@ -8,9 +8,9 @@
|
|
8 |
<link rel="preload" as="style" href="./_observablehq/theme-air,near-midnight,alt,wide.f6ca92af.css">
|
9 |
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,200..900;1,8..60,200..900&display=swap" crossorigin>
|
10 |
<link rel="stylesheet" type="text/css" href="./_observablehq/theme-air,near-midnight,alt,wide.f6ca92af.css">
|
11 |
-
<link rel="modulepreload" href="./_observablehq/client.
|
12 |
-
<link rel="modulepreload" href="./_observablehq/runtime.
|
13 |
-
<link rel="modulepreload" href="./_observablehq/stdlib.
|
14 |
<link rel="modulepreload" href="./_node/d3-array@3.2.4/index.f89e3560.js">
|
15 |
<link rel="modulepreload" href="./_npm/d3-dsv@3.0.1/407f7a1f.js">
|
16 |
<link rel="modulepreload" href="./_npm/@observablehq/plot@0.6.16/e828d8c8.js">
|
@@ -54,17 +54,17 @@
|
|
54 |
<link rel="icon" href="./_file/observable.1af93621.png" type="image/png" sizes="32x32">
|
55 |
<script type="module">
|
56 |
|
57 |
-
import {define} from "./_observablehq/client.
|
58 |
-
import {registerFile} from "./_observablehq/stdlib.
|
59 |
|
60 |
-
registerFile("./data/categories.csv", {"name":"./data/categories.csv","mimeType":"text/csv","path":"./_file/data/categories.f3fa0523.csv","lastModified":
|
61 |
-
registerFile("./data/
|
62 |
-
registerFile("./data/
|
63 |
|
64 |
-
define({id: "
|
65 |
const d3 = await import("./_node/d3-array@3.2.4/index.f89e3560.js");
|
66 |
-
const
|
67 |
-
const url =
|
68 |
const posts = await FileAttachment("./data/posts.csv").csv({ typed: true });
|
69 |
const categoriesRaw = await FileAttachment("./data/categories.csv").csv({
|
70 |
typed: true,
|
@@ -159,7 +159,13 @@ const color = {
|
|
159 |
};
|
160 |
|
161 |
const years = d3.extent(posts, (d) => d.created_at.getFullYear());
|
162 |
-
return {d3,
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
}});
|
164 |
|
165 |
define({id: "8404f401", mode: "inline", inputs: ["years","display"], body: async (years,display) => {
|
@@ -417,7 +423,7 @@ resize((width) => topAcceptedUsersPerYearChart(topAcceptedUsersPerYear, {width})
|
|
417 |
))
|
418 |
}});
|
419 |
|
420 |
-
define({id: "28e5ebab", mode: "inline", inputs: ["url","display"], body: async (url,display) => {
|
421 |
display(await(
|
422 |
url
|
423 |
))
|
@@ -440,7 +446,8 @@ d3.max(posts, d => d.created_at).getFullYear()
|
|
440 |
<main id="observablehq-main" class="observablehq">
|
441 |
<h1 id="forum-dashboard" tabindex="-1"><a class="observablehq-header-anchor" href="#forum-dashboard">Forum Dashboard</a></h1>
|
442 |
<!-- Load and transform the data -->
|
443 |
-
<div class="observablehq observablehq--block"><!--:
|
|
|
444 |
<h2 id="trends-over-time" tabindex="-1"><a class="observablehq-header-anchor" href="#trends-over-time">Trends over time</a></h2>
|
445 |
<!-- Cards with big numbers -->
|
446 |
<div class="grid grid-cols-4">
|
@@ -522,9 +529,11 @@ d3.max(posts, d => d.created_at).getFullYear()
|
|
522 |
<observablehq-loading></observablehq-loading><!--:04e33544:-->
|
523 |
</div>
|
524 |
</div>
|
525 |
-
<
|
|
|
|
|
526 |
</main>
|
527 |
<footer id="observablehq-footer">
|
528 |
-
<div>Built with <a href="https://observablehq.com/" target="_blank" rel="noopener noreferrer">Observable</a> on <a title="2024-09-
|
529 |
</footer>
|
530 |
</div>
|
|
|
8 |
<link rel="preload" as="style" href="./_observablehq/theme-air,near-midnight,alt,wide.f6ca92af.css">
|
9 |
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,200..900;1,8..60,200..900&display=swap" crossorigin>
|
10 |
<link rel="stylesheet" type="text/css" href="./_observablehq/theme-air,near-midnight,alt,wide.f6ca92af.css">
|
11 |
+
<link rel="modulepreload" href="./_observablehq/client.4d3b1f74.js">
|
12 |
+
<link rel="modulepreload" href="./_observablehq/runtime.c4c9c1af.js">
|
13 |
+
<link rel="modulepreload" href="./_observablehq/stdlib.b89f0aee.js">
|
14 |
<link rel="modulepreload" href="./_node/d3-array@3.2.4/index.f89e3560.js">
|
15 |
<link rel="modulepreload" href="./_npm/d3-dsv@3.0.1/407f7a1f.js">
|
16 |
<link rel="modulepreload" href="./_npm/@observablehq/plot@0.6.16/e828d8c8.js">
|
|
|
54 |
<link rel="icon" href="./_file/observable.1af93621.png" type="image/png" sizes="32x32">
|
55 |
<script type="module">
|
56 |
|
57 |
+
import {define} from "./_observablehq/client.4d3b1f74.js";
|
58 |
+
import {registerFile} from "./_observablehq/stdlib.b89f0aee.js";
|
59 |
|
60 |
+
registerFile("./data/categories.csv", {"name":"./data/categories.csv","mimeType":"text/csv","path":"./_file/data/categories.f3fa0523.csv","lastModified":1727299665259,"size":662});
|
61 |
+
registerFile("./data/config.json", {"name":"./data/config.json","mimeType":"application/json","path":"./_file/data/config.05513390.json","lastModified":1727299086052,"size":50});
|
62 |
+
registerFile("./data/posts.csv", {"name":"./data/posts.csv","mimeType":"text/csv","path":"./_file/data/posts.36b9d40b.csv","lastModified":1727299664899,"size":6728921});
|
63 |
|
64 |
+
define({id: "e35ec5a1", inputs: ["FileAttachment"], outputs: ["d3","config","url","posts","categoriesRaw","topics","users","topicsByCategory","categories","tenTopUsers","tenTopAcceptedUsers","NUM_USERS","topAcceptedUsersPerYear","intervals","interval","intervalLabel","color","years"], body: async (FileAttachment) => {
|
65 |
const d3 = await import("./_node/d3-array@3.2.4/index.f89e3560.js");
|
66 |
+
const config = await FileAttachment("./data/config.json").json();
|
67 |
+
const url = config.discourse_url;
|
68 |
const posts = await FileAttachment("./data/posts.csv").csv({ typed: true });
|
69 |
const categoriesRaw = await FileAttachment("./data/categories.csv").csv({
|
70 |
typed: true,
|
|
|
159 |
};
|
160 |
|
161 |
const years = d3.extent(posts, (d) => d.created_at.getFullYear());
|
162 |
+
return {d3,config,url,posts,categoriesRaw,topics,users,topicsByCategory,categories,tenTopUsers,tenTopAcceptedUsers,NUM_USERS,topAcceptedUsersPerYear,intervals,interval,intervalLabel,color,years};
|
163 |
+
}});
|
164 |
+
|
165 |
+
define({id: "28e5ebab", mode: "inline", inputs: ["url","display"], body: async (url,display) => {
|
166 |
+
display(await(
|
167 |
+
url
|
168 |
+
))
|
169 |
}});
|
170 |
|
171 |
define({id: "8404f401", mode: "inline", inputs: ["years","display"], body: async (years,display) => {
|
|
|
423 |
))
|
424 |
}});
|
425 |
|
426 |
+
define({id: "28e5ebab-1", mode: "inline", inputs: ["url","display"], body: async (url,display) => {
|
427 |
display(await(
|
428 |
url
|
429 |
))
|
|
|
446 |
<main id="observablehq-main" class="observablehq">
|
447 |
<h1 id="forum-dashboard" tabindex="-1"><a class="observablehq-header-anchor" href="#forum-dashboard">Forum Dashboard</a></h1>
|
448 |
<!-- Load and transform the data -->
|
449 |
+
<div class="observablehq observablehq--block"><!--:e35ec5a1:--></div>
|
450 |
+
<p>Statistics for the <a href="./$%7Burl%7D"><observablehq-loading></observablehq-loading><!--:28e5ebab:--></a> forum.</p>
|
451 |
<h2 id="trends-over-time" tabindex="-1"><a class="observablehq-header-anchor" href="#trends-over-time">Trends over time</a></h2>
|
452 |
<!-- Cards with big numbers -->
|
453 |
<div class="grid grid-cols-4">
|
|
|
529 |
<observablehq-loading></observablehq-loading><!--:04e33544:-->
|
530 |
</div>
|
531 |
</div>
|
532 |
+
<h2 id="data-and-code" tabindex="-1"><a class="observablehq-header-anchor" href="#data-and-code">Data and code</a></h2>
|
533 |
+
<p>The data of <a href="./$%7Burl%7D"><observablehq-loading></observablehq-loading><!--:28e5ebab-1:--></a> from <observablehq-loading></observablehq-loading><!--:78a1e913:--> to <observablehq-loading></observablehq-loading><!--:93beff2d:--> was downloaded using the <a href="https://docs.discourse.org/" target="_blank" rel="noopener noreferrer">Discourse API</a>.</p>
|
534 |
+
<p>The code is available on <a href="https://github.com/severo/discourse-dashboard" target="_blank" rel="noopener noreferrer">GitHub</a>.</p>
|
535 |
</main>
|
536 |
<footer id="observablehq-footer">
|
537 |
+
<div>Built with <a href="https://observablehq.com/" target="_blank" rel="noopener noreferrer">Observable</a> on <a title="2024-09-25T21:18:02">Sep 25, 2024</a>.</div>
|
538 |
</footer>
|
539 |
</div>
|