diff --git a/docs/assets/index-CHlCLPyk.js b/docs/assets/index-71XjqphM.js similarity index 99% rename from docs/assets/index-CHlCLPyk.js rename to docs/assets/index-71XjqphM.js index 7a97414..d665780 100644 --- a/docs/assets/index-CHlCLPyk.js +++ b/docs/assets/index-71XjqphM.js @@ -3284,4 +3284,4 @@ void main() { } gl_FragColor = vColor; } - }`,W4=function(){function t(e,n){this.styles=e,this.id="SPRITES",this.isSpriteSheetMode=!1,this.spritesPerRow=0,this.spritesPerColumn=0,this.spriteDimensions=[0,0],this.worldSpacePointPositions=new Float32Array(0),this.pickingColors=new Float32Array(0),this.renderColors=new Float32Array(0),this.standinTextureForPoints=g_.createTextureFromCanvas(document.createElement("canvas")),n&&(this.spriteSheetParams=n,this.setSpriteSheet(n),this.isSpriteSheetMode=!0),this.renderMaterial=this.createRenderMaterial(),this.pickingMaterial=this.createPickingMaterial()}return t.prototype.createUniforms=function(){return{spriteTexture:{type:"t"},spritesPerRow:{type:"f"},spritesPerColumn:{type:"f"},fogColor:{type:"c"},fogNear:{type:"f"},fogFar:{type:"f"},isImage:{type:"bool"},sizeAttenuation:{type:"bool"},pointSize:{type:"f"}}},t.prototype.createRenderMaterial=function(){this.isSpriteSheetMode;var e=this.createUniforms();return new qt.ShaderMaterial({uniforms:e,vertexShader:y_(this.styles.sprites.minPointSize),fragmentShader:V4,transparent:!0,depthFunc:qt.LessDepth,fog:this.styles.fog.enabled,blending:qt.NormalBlending})},t.prototype.createPickingMaterial=function(){var e=this.createUniforms();return new qt.ShaderMaterial({uniforms:e,vertexShader:y_(this.styles.sprites.minPointSize),fragmentShader:H4,transparent:!0,depthTest:!0,depthWrite:!0,fog:!1,blending:qt.NormalBlending})},t.prototype.createPointSprites=function(e,n){var i=n!=null?n.length/Vn.XYZ_NUM_ELEMENTS:0,r=this.createGeometry(i);this.fog=new qt.Fog(16777215),this.points=new qt.Points(r,this.renderMaterial),this.points.frustumCulled=!1,this.spriteIndexBufferAttribute!=null&&this.points.geometry.setAttribute("spriteIndex",this.spriteIndexBufferAttribute),e.add(this.points)},t.prototype.calculatePointSize=function(e){var n=this.styles.sprites.imageSize;if(this.texture)return e?n:this.spriteDimensions[0];var i=this.worldSpacePointPositions!=null?this.worldSpacePointPositions.length/Vn.XYZ_NUM_ELEMENTS:1,r=200,o=8,s=1.5,a=r/Math.log(i)/Math.log(o);return e?a:a/s},t.prototype.createGeometry=function(e){var n=e;this.pickingColors=new Float32Array(n*Vn.RGBA_NUM_ELEMENTS);for(var i=0,r=0;rn.hiX||e.loY>n.hiY||e.hiXthis.bound.hiX||e.hiYthis.bound.hiY)return!1;for(var i=this.getCellX(e.loX),r=this.getCellX(e.hiX),o=this.getCellY(e.loY),s=this.getCellY(e.hiY),a=o*this.numHorizCells+i,l=a,c=o;c<=s;c++){for(var h=i;h<=r;h++){var u=this.grid[l++];if(u){for(var f=0;f0)&&!(r=i.next()).done;)o.push(r.value)}catch(a){s={error:a}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(s)throw s.error}}return o};Object.defineProperty(Xy,"__esModule",{value:!0});var $4=hs,X4=eu,Y4=Yy,om=Pt,Z4=1e4,J4=function(){function t(e,n){this.styles=n,this.id="CANVAS_LABELS",this.worldSpacePointPositions=new Float32Array(0),this.labelsActive=!0,this.canvas=document.createElement("canvas"),e.appendChild(this.canvas),this.gc=this.canvas.getContext("2d"),this.canvas.style.position="absolute",this.canvas.style.left="0",this.canvas.style.top="0",this.canvas.style.pointerEvents="none"}return t.prototype.removeAllLabels=function(){var e=this.canvas.width*window.devicePixelRatio,n=this.canvas.height*window.devicePixelRatio;this.gc.clearRect(0,0,e,n)},t.prototype.makeLabels=function(e){if(!(e.labels==null||e.labels.pointIndices.length===0)&&this.worldSpacePointPositions!=null){var n=e.labels,i=e.cameraType===X4.CameraType.Perspective,r=parseInt(this.gc.font,10),o=window.devicePixelRatio,s;{var a=this.canvas.width*o,l=this.canvas.height*o,c={loX:0,hiX:a,loY:0,hiY:l};s=new Y4.CollisionGrid(c,a/25,l/50)}var h=[e.farthestCameraSpacePointZ,e.nearestCameraSpacePointZ],u=function(I){return om.scaleExponential(I,h,[.1,1])},f=e.camera.position,d=f.clone().sub(e.cameraTarget),m=new $4.Vector3;this.gc.textBaseline="middle",this.gc.miterLimit=2;for(var y=2,v=4,p=Math.min(Z4,n.pointIndices.length),g=0;g=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Zy,"__esModule",{value:!0});var fl=hs,w_=Pt,gh=Ci,Q4=function(){function t(){this.id="POLYLINES",this.sequences=[],this.polylines=[],this.polylinePositionBuffer={},this.polylineColorBuffer={},this.pointSequenceIndices=new Map}return t.prototype.getPointSequenceIndex=function(e){return this.pointSequenceIndices.get(e)},t.prototype.updateSequenceIndices=function(){for(var e=0;e0)&&!(r=i.next()).done;)o.push(r.value)}catch(a){s={error:a}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(s)throw s.error}}return o},sm=ue&&ue.__spread||function(){for(var t=[],e=0;e=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(hy,"__esModule",{value:!0});var eU=fy,Mo=Wy,tU=Gd,nU=eu,iU=jy,jt=Pt,yh=Ci,rU=qy,__=$y,oU=Xy,sU=Zy,aU=function(){function t(e,n){var i=this;n===void 0&&(n={}),this.pointColorer=null,this.sequences=[],this.renderMode="POINT",this.rotateOnStart=!0,this.selectEnabled=!0,this.showLabelsOnHover=!0,this.hoverPointIndex=null,this.selectedPointIndices=new Set,this.clickCallback=function(){},this.hoverCallback=function(){},this.selectCallback=function(){},this.cameraMoveCallback=function(){},this.onHover=function(r){i.hoverCallback(r),i.hoverPointIndex=r,i.updateScatterPlotAttributes(),i.renderScatterPlot()},this.onClick=function(r){i.clickCallback(r)},this.select=function(r){i.selectEnabled&&(i.selectedPointIndices=new Set(r),i.updateScatterPlotAttributes(),i.renderScatterPlot())},this.onSelect=function(r){i.selectEnabled&&(i.selectCallback(r),i.select(r))},this.containerElement=e,this.styles=iU.makeStyles(n.styles),this.setParameters(n),this.scatterPlot=new eU.ScatterPlot(e,{camera:n.camera,onClick:this.onClick,onHover:this.onHover,onSelect:this.onSelect,selectEnabled:this.selectEnabled,styles:this.styles,orbitControlParams:n.orbitControls}),this.scatterPlot.onCameraMove(this.cameraMoveCallback)}return t.prototype.setParameters=function(e){e.onClick!==void 0&&(this.clickCallback=e.onClick),e.onHover!==void 0&&(this.hoverCallback=e.onHover),e.onSelect!==void 0&&(this.selectCallback=e.onSelect),e.onCameraMove!==void 0&&(this.cameraMoveCallback=e.onCameraMove),e.pointColorer!==void 0&&(this.pointColorer=e.pointColorer),e.renderMode!==void 0&&(this.renderMode=e.renderMode),e.rotateOnStart!==void 0&&(this.rotateOnStart=e.rotateOnStart),e.selectEnabled!==void 0&&(this.selectEnabled=e.selectEnabled),e.showLabelsOnHover!==void 0&&(this.showLabelsOnHover=e.showLabelsOnHover)},t.prototype.render=function(e){this.updateDataset(e),this.clearVisualizers(),this.setVisualizers(),this.rotateOnStart&&this.scatterPlot.startOrbitAnimation()},t.prototype.clearVisualizers=function(){this.canvasLabelsVisualizer=void 0,this.labels3DVisualizer=void 0,this.pointVisualizer=void 0,this.polylineVisualizer=void 0,this.spritesheetVisualizer=void 0,this.scatterPlot.disposeAllVisualizers()},t.prototype.renderScatterPlot=function(){this.dataset&&this.scatterPlot.render()},t.prototype.resetZoom=function(){this.scatterPlot.resetZoom()},t.prototype.setRenderMode=function(e){this.renderMode=e,this.setVisualizers(),this.updateScatterPlotAttributes(),this.updateScatterPlotPositions()},t.prototype.setTextRenderMode=function(){this.setRenderMode("TEXT"),this.renderScatterPlot()},t.prototype.setPointRenderMode=function(){this.setRenderMode("POINT"),this.renderScatterPlot()},t.prototype.setSpriteRenderMode=function(){this.dataset&&this.dataset.spriteMetadata&&(this.setRenderMode("SPRITE"),this.renderScatterPlot())},t.prototype.setSequences=function(e){this.sequences=e,this.updatePolylineAttributes(),this.setVisualizers(),this.renderScatterPlot()},t.prototype.setPanMode=function(){this.scatterPlot.setInteractionMode("PAN")},t.prototype.setSelectMode=function(){this.scatterPlot.setInteractionMode("SELECT")},t.prototype.setDimensions=function(e){var n=e<2||e>3,i=this.dataset&&e>this.dataset.dimensions;if(n||i)throw new RangeError("Setting invalid dimensionality");this.scatterPlot.setDimensions(e),this.renderScatterPlot()},t.prototype.setPointColorer=function(e){this.pointColorer=e,this.updateScatterPlotAttributes(),this.renderScatterPlot()},t.prototype.callPointColorer=function(e,n){return e(n,this.selectedPointIndices,this.hoverPointIndex)},t.prototype.setHoverPointIndex=function(e){this.hoverPointIndex=e,this.updateScatterPlotAttributes(),!this.scatterPlot.orbitIsAnimating()&&this.renderScatterPlot()},t.prototype.resize=function(){this.scatterPlot.resize()},t.prototype.updateDataset=function(e){this.setDataset(e),this.scatterPlot.setDimensions(e.dimensions),this.updateScatterPlotAttributes(),this.updateScatterPlotPositions(),this.renderScatterPlot()},t.prototype.isOrbiting=function(){return this.scatterPlot.orbitIsAnimating()},t.prototype.startOrbitAnimation=function(){this.scatterPlot.startOrbitAnimation()},t.prototype.stopOrbitAnimation=function(){this.scatterPlot.stopOrbitAnimation()},t.prototype.setDataset=function(e){this.dataset=e,this.labels3DVisualizer&&this.labels3DVisualizer.setLabelStrings(this.generate3DLabelsArray())},t.prototype.updateScatterPlotPositions=function(){var e=this.dataset;if(e){var n=this.generatePointPositionArray(e);this.scatterPlot.setPointPositions(n)}},t.prototype.updateScatterPlotAttributes=function(){var e=this.dataset;if(e){var n=this.generatePointColorArray(e),i=this.generatePointScaleFactorArray(e),r=this.generateVisibleLabelRenderParams();this.scatterPlot.setPointColors(n),this.scatterPlot.setPointScaleFactors(i),this.scatterPlot.setLabels(r)}},t.prototype.updatePolylineAttributes=function(){var e=this.dataset;if(e){var n=this.generateLineSegmentColorMap(e),i=this.generateLineSegmentOpacityArray(e),r=this.generateLineSegmentWidthArray(e);this.scatterPlot.setPolylineColors(n),this.scatterPlot.setPolylineOpacities(i),this.scatterPlot.setPolylineWidths(r)}},t.prototype.generatePointPositionArray=function(e){var n=[0,0],i=[0,0],r=[0,0];n=jt.extent(e.points.map(function(p){return p[0]})),i=jt.extent(e.points.map(function(p){return p[1]})),e.dimensions===3&&(r=jt.extent(e.points.map(function(p){return p[2]})));var o=function(p){return Math.abs(p[1]-p[0])},s=o(n),a=o(i),l=o(r),c=Math.max(s,a,l),h=yh.SCATTER_PLOT_CUBE_LENGTH/2,u=function(p,g){return[-g*(p/c),g*(p/c)]},f=u(s,h),d=u(a,h),m=u(l,h),y=new Float32Array(e.points.length*3),v=0;return e.points.forEach(function(p,g){var w=e.points[g];y[v++]=jt.scaleLinear(w[0],n,f),y[v++]=jt.scaleLinear(w[1],i,d),e.dimensions===3?y[v++]=jt.scaleLinear(w[2],r,m):y[v++]=0}),y},t.prototype.generateVisibleLabelRenderParams=function(){var e=this,n=e.hoverPointIndex,i=e.selectedPointIndices,r=e.styles,o=n!==null?1:0,s=new Uint32Array(o),a=new Float32Array(o),l=new Int8Array(o),c=new Uint8Array(o*3),h=new Uint8Array(o*3),u=[];a.fill(r.label.scaleDefault),l.fill(1);var f=0;if(n!==null){u.push(this.getLabelText(n)),s[f]=n,a[f]=r.label.scaleLarge,l[f]=0;var d=jt.styleRgbFromHexColor(r.label.fillColorHover);jt.packRgbIntoUint8Array(c,f,d[0],d[1],d[2]);var m=jt.styleRgbFromHexColor(r.label.strokeColorHover);jt.packRgbIntoUint8Array(h,f,m[0],m[1],m[1]),++f}{var d=jt.styleRgbFromHexColor(r.label.fillColorSelected),m=jt.styleRgbFromHexColor(r.label.strokeColorSelected);if(i.size===1){var y=sm(i)[0];u.push(this.getLabelText(y)),s[f]=y,a[f]=r.label.scaleLarge,l[f]=0,jt.packRgbIntoUint8Array(c,f,d[0],d[1],d[2]),jt.packRgbIntoUint8Array(h,f,m[0],m[1],m[2])}}return new nU.LabelRenderParams(new Float32Array(s),u,a,l,r.label.fontSize,c,h)},t.prototype.generatePointScaleFactorArray=function(e){var n,i,r=this,o=r.hoverPointIndex,s=r.selectedPointIndices,a=r.styles,l=a.point,c=l.scaleDefault,h=l.scaleSelected,u=l.scaleHover,f=new Float32Array(e.points.length);f.fill(c),s.size;try{for(var d=x_(s.values()),m=d.next();!m.done;m=d.next()){var y=m.value;f[y]=h}}catch(v){n={error:v}}finally{try{m&&!m.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}return o!=null&&(f[o]=u),f},t.prototype.generatePointColorArray=function(e){var n,i,r=this,o=r.hoverPointIndex,s=r.pointColorer,a=r.selectedPointIndices,l=r.styles,c=l.point,h=c.colorHover,u=c.colorNoSelection,f=c.colorSelected,d=c.colorUnselected,m=new Float32Array(e.points.length*yh.RGBA_NUM_ELEMENTS),y=d,v=u;this.renderMode==="TEXT"&&(y=this.styles.label3D.colorUnselected,v=this.styles.label3D.colorNoSelection),this.renderMode==="SPRITE"&&(y=this.styles.sprites.colorUnselected,v=this.styles.sprites.colorNoSelection);var p=e.points.length,g=this.selectedPointIndices.size;if(s)for(var w=0,x=0;x0?Mo.parseColor(y):Mo.parseColor(v),x=0;x0){o.fill(r.polyline.deselectedOpacity);var a=this.polylineVisualizer.getPointSequenceIndex(sm(i)[0]);a!==void 0&&(o[a]=r.polyline.selectedOpacity)}else o.fill(r.polyline.defaultOpacity);return o},t.prototype.generateLineSegmentWidthArray=function(e){var n=this,i=n.selectedPointIndices,r=n.styles,o=new Float32Array(this.sequences.length);o.fill(r.polyline.defaultLineWidth);var s=i.size;if(s>0){var a=this.polylineVisualizer.getPointSequenceIndex(sm(i)[0]);a!==void 0&&(o[a]=r.polyline.selectedLineWidth)}return o},t.prototype.getLabelText=function(e){var n=this.dataset;if(!n)return"";var i=n.metadata[e];return i&&i.label!=null?""+i.label:""},t.prototype.initializeCanvasLabelsVisualizer=function(){return this.canvasLabelsVisualizer||(this.canvasLabelsVisualizer=new oU.ScatterPlotVisualizerCanvasLabels(this.containerElement,this.styles)),this.canvasLabelsVisualizer},t.prototype.initialize3DLabelsVisualizer=function(){return this.labels3DVisualizer||(this.labels3DVisualizer=new rU.ScatterPlotVisualizer3DLabels(this.styles)),this.labels3DVisualizer.setLabelStrings(this.generate3DLabelsArray()),this.labels3DVisualizer},t.prototype.initializePointVisualizer=function(){return this.pointVisualizer||(this.pointVisualizer=new __.ScatterPlotVisualizerSprites(this.styles)),this.pointVisualizer},t.prototype.initializeSpritesheetVisualizer=function(){var e=this,n=this.styles,i=this.dataset,r=i.spriteMetadata;if(!this.spritesheetVisualizer&&r){if(!r.spriteImage||!r.singleSpriteSize)return;var o=i.points.length,s=void 0;if(r.spriteIndices)s=new Float32Array(r.spriteIndices);else{s=new Float32Array(o);for(var a=0;a0){var o=this.initializePolylineVisualizer();r.push(o)}var s=i==="POINT"||i==="SPRITE";if(s&&this.showLabelsOnHover){var o=this.initializeCanvasLabelsVisualizer();r.push(o)}this.scatterPlot.setActiveVisualizers(r)},t.Dataset=tU.Dataset,t}();hy.ScatterGL=aU;Object.defineProperty(uy,"__esModule",{value:!0});var lU=hy,am=uy.ScatterGL=lU.ScatterGL,cU=Gd;uy.Dataset=cU.Dataset;const uU=function*(t,e){const n={nComponents:2,nNeighbors:2,minDist:.1},i={...n,...e},r=new oy.UMAP({nComponents:i.nComponents,nNeighbors:i.nNeighbors,minDist:i.minDist}),o=r.initializeFit(t);for(let s=0;s{const[e,n]=Xn.useState(!0),i=Xn.useRef();return Xn.useEffect(()=>{if(t.data!==void 0&&t.data.length){i.current.replaceChildren();const r=t.data,o=r.map(h=>h.embedding),s=r.map(h=>({label:h.description})),a=r.map(h=>t.colormap[h.term].hsla),l=new am(i.current,{showLabelsOnHover:!1,selectEnabled:!1,orbitControls:{autoRotateSpeed:2},styles:{axesVisible:!1,label:{fontSize:8},point:{scaleDefault:2.5,scaleSelected:2.5,scaleHover:2.5}}});l.setPointColorer(function(h,u,f){return a[h]}),i.current.addEventListener("dblclick",()=>{l.isOrbiting()||l.startOrbitAnimation()}),window.addEventListener("resize",()=>{l.resize()});const c={nComponents:3,nNeighbors:5,minDist:.75};if(t.stepped==null||t.stepped=="true"){const h=uU(o,c);let u=h.next();for(;!u.done;){const f=new am.Dataset(u.value,s);l.render(f),u=h.next()}}else{const u=new oy.UMAP(c).fit(o),f=new am.Dataset(u,s);l.render(f)}}return()=>{n(!0)}},[t]),$e.jsxs("div",{id:"scatterplot",children:[$e.jsx("div",{className:"figure",ref:i}),$e.jsxs("div",{className:"legend",children:[$e.jsx("p",{children:"What do the terms 'pipeline', 'workflow' and 'work package' mean to you?"}),$e.jsxs("p",{children:[$e.jsx("span",{className:"dot blue"})," pipeline"]}),$e.jsxs("p",{children:[$e.jsx("span",{className:"dot purple"})," workflow"]}),$e.jsxs("p",{children:[$e.jsx("span",{className:"dot pink"})," work package"]})]})]})},M_={term_descriptions:"./assets/data/term_descriptions.json",term_stats:"./assets/data/term_stats.json"},b_={code:{hsla:"hsla(354, 81%, 63%, 0.75)",rgba:"rgba(237, 85, 101, 0.75)"},milestone:{hsla:"hsla(10, 97%, 65%, 0.75)",rgba:"rgba(252, 110, 81, 0.75)"},pipeline:{hsla:"hsla(196, 78%, 61%, 0.75)",rgba:"rgba(79, 193, 233, 0.75)"},software:{hsla:"hsla(89, 56%, 62%, 0.75)",rgba:"rgba(160, 212, 104, 0.75)"},tool:{hsla:"hsla(43, 100%, 66%, 0.75)",rgba:"rgba(255, 206, 84, 0.75)"},workflow:{hsla:"hsla(257, 70%, 75%, 0.75)",rgba:"rgba(172, 146, 236, 0.75)"},"work package":{hsla:"hsla(326, 73%, 73%, 0.75)",rgba:"rgba(236, 135, 192, 0.75)"},other:{hsla:"hsla(217, 15%, 83%, 0.75)",rgba:"rgba(204, 209, 217, 0.75)"}},fU=()=>{const[t,e]=Xn.useState({}),[n,i]=Xn.useState({});return Xn.useEffect(()=>{const r=async()=>{try{await fetch(M_.term_stats,{headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(a=>a.json()).then(a=>{e(l=>JSON.stringify(a)==JSON.stringify(l)?l:{...l,...a})})}catch(a){console.log(a)}},o=async()=>{try{await fetch(M_.term_descriptions,{headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(a=>a.json()).then(a=>{i(l=>JSON.stringify(a)==JSON.stringify(l)?l:{...l,...a})})}catch(a){console.log(a)}};r(),o();const s=setInterval(()=>{r(),o()},6e4*2);return()=>{clearInterval(s),e({}),i({})}},[]),$e.jsxs("div",{id:"container",children:[$e.jsxs("div",{id:"blurb",children:[$e.jsx("h1",{children:"Pipelines, workflows, work packages: what's in a word?"}),$e.jsx("p",{children:`This is a part of the research work entitled "Pipelines, workflows, work packages: what's in a word: a reflection on metaphors used to design interdisciplinary projects in Digital Humanities" conducted by a team based at the Digital humanities Research Hub, School of Advanced Study, University of London.`}),$e.jsx("p",{children:"For the DARIAH2024 annual event, we developed a questionnaire and digital poster to engage with the participants, and to gather and visualise community responses in situ."}),$e.jsx("p",{children:"The questionnaire aims to capture how the DH community is currently using available terms describing project design, implementation and planning in interdisciplinary Digital Humanities projects. Alongside these evidence-based findings, the team seeks to further assess differences among these concepts by focusing on aspects of interoperability, reproducibility, research planning and interdisciplinary collaboration among team members in DH projects."}),$e.jsxs("div",{id:"qrcode",children:[$e.jsx("img",{id:"qrcode",src:"./assets/images/qrcode.png"}),$e.jsx("p",{children:$e.jsx("b",{children:"We welcome your participation in our short questionnaire. Please scan the QR code or visit https://tinyurl.com/dariah2024"})})]}),$e.jsx("div",{id:"logo",children:$e.jsx("img",{src:"./assets/images/School_of_Advanced_Study_Logo.png",alt:"School of Advanced Study, University of London"})})]}),n.term_descriptions&&n.term_descriptions.length?$e.jsx(hU,{data:n.term_descriptions,stepped:"false",colormap:b_}):null,t.term_stats&&t.term_stats.length?$e.jsx(j3,{data:t.term_stats,colormap:b_}):null]})};lm.createRoot(document.getElementById("root")).render($e.jsx(MT.StrictMode,{children:$e.jsx(fU,{})})); + }`,W4=function(){function t(e,n){this.styles=e,this.id="SPRITES",this.isSpriteSheetMode=!1,this.spritesPerRow=0,this.spritesPerColumn=0,this.spriteDimensions=[0,0],this.worldSpacePointPositions=new Float32Array(0),this.pickingColors=new Float32Array(0),this.renderColors=new Float32Array(0),this.standinTextureForPoints=g_.createTextureFromCanvas(document.createElement("canvas")),n&&(this.spriteSheetParams=n,this.setSpriteSheet(n),this.isSpriteSheetMode=!0),this.renderMaterial=this.createRenderMaterial(),this.pickingMaterial=this.createPickingMaterial()}return t.prototype.createUniforms=function(){return{spriteTexture:{type:"t"},spritesPerRow:{type:"f"},spritesPerColumn:{type:"f"},fogColor:{type:"c"},fogNear:{type:"f"},fogFar:{type:"f"},isImage:{type:"bool"},sizeAttenuation:{type:"bool"},pointSize:{type:"f"}}},t.prototype.createRenderMaterial=function(){this.isSpriteSheetMode;var e=this.createUniforms();return new qt.ShaderMaterial({uniforms:e,vertexShader:y_(this.styles.sprites.minPointSize),fragmentShader:V4,transparent:!0,depthFunc:qt.LessDepth,fog:this.styles.fog.enabled,blending:qt.NormalBlending})},t.prototype.createPickingMaterial=function(){var e=this.createUniforms();return new qt.ShaderMaterial({uniforms:e,vertexShader:y_(this.styles.sprites.minPointSize),fragmentShader:H4,transparent:!0,depthTest:!0,depthWrite:!0,fog:!1,blending:qt.NormalBlending})},t.prototype.createPointSprites=function(e,n){var i=n!=null?n.length/Vn.XYZ_NUM_ELEMENTS:0,r=this.createGeometry(i);this.fog=new qt.Fog(16777215),this.points=new qt.Points(r,this.renderMaterial),this.points.frustumCulled=!1,this.spriteIndexBufferAttribute!=null&&this.points.geometry.setAttribute("spriteIndex",this.spriteIndexBufferAttribute),e.add(this.points)},t.prototype.calculatePointSize=function(e){var n=this.styles.sprites.imageSize;if(this.texture)return e?n:this.spriteDimensions[0];var i=this.worldSpacePointPositions!=null?this.worldSpacePointPositions.length/Vn.XYZ_NUM_ELEMENTS:1,r=200,o=8,s=1.5,a=r/Math.log(i)/Math.log(o);return e?a:a/s},t.prototype.createGeometry=function(e){var n=e;this.pickingColors=new Float32Array(n*Vn.RGBA_NUM_ELEMENTS);for(var i=0,r=0;rn.hiX||e.loY>n.hiY||e.hiXthis.bound.hiX||e.hiYthis.bound.hiY)return!1;for(var i=this.getCellX(e.loX),r=this.getCellX(e.hiX),o=this.getCellY(e.loY),s=this.getCellY(e.hiY),a=o*this.numHorizCells+i,l=a,c=o;c<=s;c++){for(var h=i;h<=r;h++){var u=this.grid[l++];if(u){for(var f=0;f0)&&!(r=i.next()).done;)o.push(r.value)}catch(a){s={error:a}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(s)throw s.error}}return o};Object.defineProperty(Xy,"__esModule",{value:!0});var $4=hs,X4=eu,Y4=Yy,om=Pt,Z4=1e4,J4=function(){function t(e,n){this.styles=n,this.id="CANVAS_LABELS",this.worldSpacePointPositions=new Float32Array(0),this.labelsActive=!0,this.canvas=document.createElement("canvas"),e.appendChild(this.canvas),this.gc=this.canvas.getContext("2d"),this.canvas.style.position="absolute",this.canvas.style.left="0",this.canvas.style.top="0",this.canvas.style.pointerEvents="none"}return t.prototype.removeAllLabels=function(){var e=this.canvas.width*window.devicePixelRatio,n=this.canvas.height*window.devicePixelRatio;this.gc.clearRect(0,0,e,n)},t.prototype.makeLabels=function(e){if(!(e.labels==null||e.labels.pointIndices.length===0)&&this.worldSpacePointPositions!=null){var n=e.labels,i=e.cameraType===X4.CameraType.Perspective,r=parseInt(this.gc.font,10),o=window.devicePixelRatio,s;{var a=this.canvas.width*o,l=this.canvas.height*o,c={loX:0,hiX:a,loY:0,hiY:l};s=new Y4.CollisionGrid(c,a/25,l/50)}var h=[e.farthestCameraSpacePointZ,e.nearestCameraSpacePointZ],u=function(I){return om.scaleExponential(I,h,[.1,1])},f=e.camera.position,d=f.clone().sub(e.cameraTarget),m=new $4.Vector3;this.gc.textBaseline="middle",this.gc.miterLimit=2;for(var y=2,v=4,p=Math.min(Z4,n.pointIndices.length),g=0;g=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Zy,"__esModule",{value:!0});var fl=hs,w_=Pt,gh=Ci,Q4=function(){function t(){this.id="POLYLINES",this.sequences=[],this.polylines=[],this.polylinePositionBuffer={},this.polylineColorBuffer={},this.pointSequenceIndices=new Map}return t.prototype.getPointSequenceIndex=function(e){return this.pointSequenceIndices.get(e)},t.prototype.updateSequenceIndices=function(){for(var e=0;e0)&&!(r=i.next()).done;)o.push(r.value)}catch(a){s={error:a}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(s)throw s.error}}return o},sm=ue&&ue.__spread||function(){for(var t=[],e=0;e=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(hy,"__esModule",{value:!0});var eU=fy,Mo=Wy,tU=Gd,nU=eu,iU=jy,jt=Pt,yh=Ci,rU=qy,__=$y,oU=Xy,sU=Zy,aU=function(){function t(e,n){var i=this;n===void 0&&(n={}),this.pointColorer=null,this.sequences=[],this.renderMode="POINT",this.rotateOnStart=!0,this.selectEnabled=!0,this.showLabelsOnHover=!0,this.hoverPointIndex=null,this.selectedPointIndices=new Set,this.clickCallback=function(){},this.hoverCallback=function(){},this.selectCallback=function(){},this.cameraMoveCallback=function(){},this.onHover=function(r){i.hoverCallback(r),i.hoverPointIndex=r,i.updateScatterPlotAttributes(),i.renderScatterPlot()},this.onClick=function(r){i.clickCallback(r)},this.select=function(r){i.selectEnabled&&(i.selectedPointIndices=new Set(r),i.updateScatterPlotAttributes(),i.renderScatterPlot())},this.onSelect=function(r){i.selectEnabled&&(i.selectCallback(r),i.select(r))},this.containerElement=e,this.styles=iU.makeStyles(n.styles),this.setParameters(n),this.scatterPlot=new eU.ScatterPlot(e,{camera:n.camera,onClick:this.onClick,onHover:this.onHover,onSelect:this.onSelect,selectEnabled:this.selectEnabled,styles:this.styles,orbitControlParams:n.orbitControls}),this.scatterPlot.onCameraMove(this.cameraMoveCallback)}return t.prototype.setParameters=function(e){e.onClick!==void 0&&(this.clickCallback=e.onClick),e.onHover!==void 0&&(this.hoverCallback=e.onHover),e.onSelect!==void 0&&(this.selectCallback=e.onSelect),e.onCameraMove!==void 0&&(this.cameraMoveCallback=e.onCameraMove),e.pointColorer!==void 0&&(this.pointColorer=e.pointColorer),e.renderMode!==void 0&&(this.renderMode=e.renderMode),e.rotateOnStart!==void 0&&(this.rotateOnStart=e.rotateOnStart),e.selectEnabled!==void 0&&(this.selectEnabled=e.selectEnabled),e.showLabelsOnHover!==void 0&&(this.showLabelsOnHover=e.showLabelsOnHover)},t.prototype.render=function(e){this.updateDataset(e),this.clearVisualizers(),this.setVisualizers(),this.rotateOnStart&&this.scatterPlot.startOrbitAnimation()},t.prototype.clearVisualizers=function(){this.canvasLabelsVisualizer=void 0,this.labels3DVisualizer=void 0,this.pointVisualizer=void 0,this.polylineVisualizer=void 0,this.spritesheetVisualizer=void 0,this.scatterPlot.disposeAllVisualizers()},t.prototype.renderScatterPlot=function(){this.dataset&&this.scatterPlot.render()},t.prototype.resetZoom=function(){this.scatterPlot.resetZoom()},t.prototype.setRenderMode=function(e){this.renderMode=e,this.setVisualizers(),this.updateScatterPlotAttributes(),this.updateScatterPlotPositions()},t.prototype.setTextRenderMode=function(){this.setRenderMode("TEXT"),this.renderScatterPlot()},t.prototype.setPointRenderMode=function(){this.setRenderMode("POINT"),this.renderScatterPlot()},t.prototype.setSpriteRenderMode=function(){this.dataset&&this.dataset.spriteMetadata&&(this.setRenderMode("SPRITE"),this.renderScatterPlot())},t.prototype.setSequences=function(e){this.sequences=e,this.updatePolylineAttributes(),this.setVisualizers(),this.renderScatterPlot()},t.prototype.setPanMode=function(){this.scatterPlot.setInteractionMode("PAN")},t.prototype.setSelectMode=function(){this.scatterPlot.setInteractionMode("SELECT")},t.prototype.setDimensions=function(e){var n=e<2||e>3,i=this.dataset&&e>this.dataset.dimensions;if(n||i)throw new RangeError("Setting invalid dimensionality");this.scatterPlot.setDimensions(e),this.renderScatterPlot()},t.prototype.setPointColorer=function(e){this.pointColorer=e,this.updateScatterPlotAttributes(),this.renderScatterPlot()},t.prototype.callPointColorer=function(e,n){return e(n,this.selectedPointIndices,this.hoverPointIndex)},t.prototype.setHoverPointIndex=function(e){this.hoverPointIndex=e,this.updateScatterPlotAttributes(),!this.scatterPlot.orbitIsAnimating()&&this.renderScatterPlot()},t.prototype.resize=function(){this.scatterPlot.resize()},t.prototype.updateDataset=function(e){this.setDataset(e),this.scatterPlot.setDimensions(e.dimensions),this.updateScatterPlotAttributes(),this.updateScatterPlotPositions(),this.renderScatterPlot()},t.prototype.isOrbiting=function(){return this.scatterPlot.orbitIsAnimating()},t.prototype.startOrbitAnimation=function(){this.scatterPlot.startOrbitAnimation()},t.prototype.stopOrbitAnimation=function(){this.scatterPlot.stopOrbitAnimation()},t.prototype.setDataset=function(e){this.dataset=e,this.labels3DVisualizer&&this.labels3DVisualizer.setLabelStrings(this.generate3DLabelsArray())},t.prototype.updateScatterPlotPositions=function(){var e=this.dataset;if(e){var n=this.generatePointPositionArray(e);this.scatterPlot.setPointPositions(n)}},t.prototype.updateScatterPlotAttributes=function(){var e=this.dataset;if(e){var n=this.generatePointColorArray(e),i=this.generatePointScaleFactorArray(e),r=this.generateVisibleLabelRenderParams();this.scatterPlot.setPointColors(n),this.scatterPlot.setPointScaleFactors(i),this.scatterPlot.setLabels(r)}},t.prototype.updatePolylineAttributes=function(){var e=this.dataset;if(e){var n=this.generateLineSegmentColorMap(e),i=this.generateLineSegmentOpacityArray(e),r=this.generateLineSegmentWidthArray(e);this.scatterPlot.setPolylineColors(n),this.scatterPlot.setPolylineOpacities(i),this.scatterPlot.setPolylineWidths(r)}},t.prototype.generatePointPositionArray=function(e){var n=[0,0],i=[0,0],r=[0,0];n=jt.extent(e.points.map(function(p){return p[0]})),i=jt.extent(e.points.map(function(p){return p[1]})),e.dimensions===3&&(r=jt.extent(e.points.map(function(p){return p[2]})));var o=function(p){return Math.abs(p[1]-p[0])},s=o(n),a=o(i),l=o(r),c=Math.max(s,a,l),h=yh.SCATTER_PLOT_CUBE_LENGTH/2,u=function(p,g){return[-g*(p/c),g*(p/c)]},f=u(s,h),d=u(a,h),m=u(l,h),y=new Float32Array(e.points.length*3),v=0;return e.points.forEach(function(p,g){var w=e.points[g];y[v++]=jt.scaleLinear(w[0],n,f),y[v++]=jt.scaleLinear(w[1],i,d),e.dimensions===3?y[v++]=jt.scaleLinear(w[2],r,m):y[v++]=0}),y},t.prototype.generateVisibleLabelRenderParams=function(){var e=this,n=e.hoverPointIndex,i=e.selectedPointIndices,r=e.styles,o=n!==null?1:0,s=new Uint32Array(o),a=new Float32Array(o),l=new Int8Array(o),c=new Uint8Array(o*3),h=new Uint8Array(o*3),u=[];a.fill(r.label.scaleDefault),l.fill(1);var f=0;if(n!==null){u.push(this.getLabelText(n)),s[f]=n,a[f]=r.label.scaleLarge,l[f]=0;var d=jt.styleRgbFromHexColor(r.label.fillColorHover);jt.packRgbIntoUint8Array(c,f,d[0],d[1],d[2]);var m=jt.styleRgbFromHexColor(r.label.strokeColorHover);jt.packRgbIntoUint8Array(h,f,m[0],m[1],m[1]),++f}{var d=jt.styleRgbFromHexColor(r.label.fillColorSelected),m=jt.styleRgbFromHexColor(r.label.strokeColorSelected);if(i.size===1){var y=sm(i)[0];u.push(this.getLabelText(y)),s[f]=y,a[f]=r.label.scaleLarge,l[f]=0,jt.packRgbIntoUint8Array(c,f,d[0],d[1],d[2]),jt.packRgbIntoUint8Array(h,f,m[0],m[1],m[2])}}return new nU.LabelRenderParams(new Float32Array(s),u,a,l,r.label.fontSize,c,h)},t.prototype.generatePointScaleFactorArray=function(e){var n,i,r=this,o=r.hoverPointIndex,s=r.selectedPointIndices,a=r.styles,l=a.point,c=l.scaleDefault,h=l.scaleSelected,u=l.scaleHover,f=new Float32Array(e.points.length);f.fill(c),s.size;try{for(var d=x_(s.values()),m=d.next();!m.done;m=d.next()){var y=m.value;f[y]=h}}catch(v){n={error:v}}finally{try{m&&!m.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}return o!=null&&(f[o]=u),f},t.prototype.generatePointColorArray=function(e){var n,i,r=this,o=r.hoverPointIndex,s=r.pointColorer,a=r.selectedPointIndices,l=r.styles,c=l.point,h=c.colorHover,u=c.colorNoSelection,f=c.colorSelected,d=c.colorUnselected,m=new Float32Array(e.points.length*yh.RGBA_NUM_ELEMENTS),y=d,v=u;this.renderMode==="TEXT"&&(y=this.styles.label3D.colorUnselected,v=this.styles.label3D.colorNoSelection),this.renderMode==="SPRITE"&&(y=this.styles.sprites.colorUnselected,v=this.styles.sprites.colorNoSelection);var p=e.points.length,g=this.selectedPointIndices.size;if(s)for(var w=0,x=0;x0?Mo.parseColor(y):Mo.parseColor(v),x=0;x0){o.fill(r.polyline.deselectedOpacity);var a=this.polylineVisualizer.getPointSequenceIndex(sm(i)[0]);a!==void 0&&(o[a]=r.polyline.selectedOpacity)}else o.fill(r.polyline.defaultOpacity);return o},t.prototype.generateLineSegmentWidthArray=function(e){var n=this,i=n.selectedPointIndices,r=n.styles,o=new Float32Array(this.sequences.length);o.fill(r.polyline.defaultLineWidth);var s=i.size;if(s>0){var a=this.polylineVisualizer.getPointSequenceIndex(sm(i)[0]);a!==void 0&&(o[a]=r.polyline.selectedLineWidth)}return o},t.prototype.getLabelText=function(e){var n=this.dataset;if(!n)return"";var i=n.metadata[e];return i&&i.label!=null?""+i.label:""},t.prototype.initializeCanvasLabelsVisualizer=function(){return this.canvasLabelsVisualizer||(this.canvasLabelsVisualizer=new oU.ScatterPlotVisualizerCanvasLabels(this.containerElement,this.styles)),this.canvasLabelsVisualizer},t.prototype.initialize3DLabelsVisualizer=function(){return this.labels3DVisualizer||(this.labels3DVisualizer=new rU.ScatterPlotVisualizer3DLabels(this.styles)),this.labels3DVisualizer.setLabelStrings(this.generate3DLabelsArray()),this.labels3DVisualizer},t.prototype.initializePointVisualizer=function(){return this.pointVisualizer||(this.pointVisualizer=new __.ScatterPlotVisualizerSprites(this.styles)),this.pointVisualizer},t.prototype.initializeSpritesheetVisualizer=function(){var e=this,n=this.styles,i=this.dataset,r=i.spriteMetadata;if(!this.spritesheetVisualizer&&r){if(!r.spriteImage||!r.singleSpriteSize)return;var o=i.points.length,s=void 0;if(r.spriteIndices)s=new Float32Array(r.spriteIndices);else{s=new Float32Array(o);for(var a=0;a0){var o=this.initializePolylineVisualizer();r.push(o)}var s=i==="POINT"||i==="SPRITE";if(s&&this.showLabelsOnHover){var o=this.initializeCanvasLabelsVisualizer();r.push(o)}this.scatterPlot.setActiveVisualizers(r)},t.Dataset=tU.Dataset,t}();hy.ScatterGL=aU;Object.defineProperty(uy,"__esModule",{value:!0});var lU=hy,am=uy.ScatterGL=lU.ScatterGL,cU=Gd;uy.Dataset=cU.Dataset;const uU=function*(t,e){const n={nComponents:2,nNeighbors:2,minDist:.1},i={...n,...e},r=new oy.UMAP({nComponents:i.nComponents,nNeighbors:i.nNeighbors,minDist:i.minDist}),o=r.initializeFit(t);for(let s=0;s{const[e,n]=Xn.useState(!0),i=Xn.useRef();return Xn.useEffect(()=>{if(t.data!==void 0&&t.data.length){i.current.replaceChildren();const r=t.data,o=r.map(h=>h.embedding),s=r.map(h=>({label:h.description})),a=r.map(h=>t.colormap[h.term].hsla),l=new am(i.current,{showLabelsOnHover:!1,selectEnabled:!1,orbitControls:{autoRotateSpeed:2},styles:{axesVisible:!1,label:{fontSize:8},point:{scaleDefault:2.5,scaleSelected:2.5,scaleHover:2.5}}});l.setPointColorer(function(h,u,f){return a[h]}),i.current.addEventListener("dblclick",()=>{l.isOrbiting()||l.startOrbitAnimation()}),window.addEventListener("resize",()=>{l.resize()});const c={nComponents:3,nNeighbors:5,minDist:.75};if(t.stepped==null||t.stepped=="true"){const h=uU(o,c);let u=h.next();for(;!u.done;){const f=new am.Dataset(u.value,s);l.render(f),u=h.next()}}else{const u=new oy.UMAP(c).fit(o),f=new am.Dataset(u,s);l.render(f)}}return()=>{n(!0)}},[t]),$e.jsxs("div",{id:"scatterplot",children:[$e.jsx("div",{className:"figure",ref:i}),$e.jsxs("div",{className:"legend",children:[$e.jsx("p",{children:"What do the terms 'pipeline', 'workflow' and 'work package' mean to you?"}),$e.jsxs("p",{children:[$e.jsx("span",{className:"dot blue"})," pipeline"]}),$e.jsxs("p",{children:[$e.jsx("span",{className:"dot purple"})," workflow"]}),$e.jsxs("p",{children:[$e.jsx("span",{className:"dot pink"})," work package"]})]})]})},M_={term_descriptions:"./assets/data/term_descriptions.json",term_stats:"./assets/data/term_stats.json"},b_={code:{hsla:"hsla(354, 81%, 63%, 0.75)",rgba:"rgba(237, 85, 101, 0.75)"},milestone:{hsla:"hsla(10, 97%, 65%, 0.75)",rgba:"rgba(252, 110, 81, 0.75)"},pipeline:{hsla:"hsla(196, 78%, 61%, 0.75)",rgba:"rgba(79, 193, 233, 0.75)"},software:{hsla:"hsla(89, 56%, 62%, 0.75)",rgba:"rgba(160, 212, 104, 0.75)"},tool:{hsla:"hsla(43, 100%, 66%, 0.75)",rgba:"rgba(255, 206, 84, 0.75)"},workflow:{hsla:"hsla(257, 70%, 75%, 0.75)",rgba:"rgba(172, 146, 236, 0.75)"},"work package":{hsla:"hsla(326, 73%, 73%, 0.75)",rgba:"rgba(236, 135, 192, 0.75)"},other:{hsla:"hsla(217, 15%, 83%, 0.75)",rgba:"rgba(204, 209, 217, 0.75)"}},fU=()=>{const[t,e]=Xn.useState({}),[n,i]=Xn.useState({});return Xn.useEffect(()=>{const r=async()=>{try{await fetch(M_.term_stats,{headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(s=>s.json()).then(s=>{e(a=>JSON.stringify(s)==JSON.stringify(a)?a:{...a,...s})})}catch(s){console.log(s)}},o=async()=>{try{await fetch(M_.term_descriptions,{headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(s=>s.json()).then(s=>{i(a=>JSON.stringify(s)==JSON.stringify(a)?a:{...a,...s})})}catch(s){console.log(s)}};return r(),o(),()=>{e({}),i({})}},[]),$e.jsxs("div",{id:"container",children:[$e.jsxs("div",{id:"blurb",children:[$e.jsx("h1",{children:"Pipelines, workflows, work packages: what's in a word?"}),$e.jsx("p",{children:`This is a part of the research work entitled "Pipelines, workflows, work packages: what's in a word: a reflection on metaphors used to design interdisciplinary projects in Digital Humanities" conducted by a team based at the Digital humanities Research Hub, School of Advanced Study, University of London.`}),$e.jsx("p",{children:"For the DARIAH2024 annual event, we developed a questionnaire and digital poster to engage with the participants, and to gather and visualise community responses in situ."}),$e.jsx("p",{children:"The questionnaire aims to capture how the DH community is currently using available terms describing project design, implementation and planning in interdisciplinary Digital Humanities projects. Alongside these evidence-based findings, the team seeks to further assess differences among these concepts by focusing on aspects of interoperability, reproducibility, research planning and interdisciplinary collaboration among team members in DH projects."}),$e.jsxs("div",{id:"qrcode",children:[$e.jsx("img",{id:"qrcode",src:"./assets/images/qrcode.png"}),$e.jsx("p",{children:$e.jsx("b",{children:"We welcome your participation in our short questionnaire. Please scan the QR code or visit https://tinyurl.com/dariah2024"})})]}),$e.jsx("div",{id:"logo",children:$e.jsx("img",{src:"./assets/images/School_of_Advanced_Study_Logo.png",alt:"School of Advanced Study, University of London"})})]}),n.term_descriptions&&n.term_descriptions.length?$e.jsx(hU,{data:n.term_descriptions,stepped:"false",colormap:b_}):null,t.term_stats&&t.term_stats.length?$e.jsx(j3,{data:t.term_stats,colormap:b_}):null]})};lm.createRoot(document.getElementById("root")).render($e.jsx(MT.StrictMode,{children:$e.jsx(fU,{})})); diff --git a/docs/index.html b/docs/index.html index 77a8afc..087d267 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ SAS-DHRH@DARIAH2024 - +