Published
Edited
Nov 19, 2021
Fork of Timeline BPM
1 star
Insert cell
Insert cell
Insert cell
function reverseString(string) {
return string.split("").reduceRight((res, v) => (res += v), "");
}
Insert cell
Insert cell
Insert cell
Insert cell
testJonLD.map((currentElement) => ({
id: reverseString(reverseString(currentElement["@type"][0]).split("#")[0])
}))
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
twopi = layout("twopi")
Insert cell
Insert cell
Insert cell
Insert cell
newEngine = require(" https://cdn.skypack.dev/pin/@comunica/actor-init-sparql-rdfjs@v1.22.3-X4m1Ip73peTDZ06H3XDW/mode=imports,min/optimized/@comunica/actor-init-sparql-rdfjs.js")
.engine
Insert cell
datax = FileAttachment("OMGSpecificationsInferredTransformed@1.json").json()
Insert cell
Insert cell
columns = datax.columns
Insert cell
viewof dataType = Inputs.select(
datax.map((d) => d.kindOfThing),
{ sort: true, unique: true, label: "kindOfThing" }
)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
n3 = import("https://cdn.skypack.dev/n3@1.11.2?min")
Insert cell
graphy = require("https://bundle.run/graphy@4.3.3")
Insert cell
require("@rdfjs/data-model@1.3.4/dist/rdf-data-model.js")
Insert cell
rdflib = require("rdflib@2.2.10/lib/index.js").catch(
() => window["_interopRequireDefault"]
)
Insert cell
quadstore = import("https://cdn.skypack.dev/quadstore@9.1.0?min")
Insert cell
comunica = require("https://bundle.run/@comunica/actor-rdf-parse-jsonld@1.22.1")
Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

Insert cell
datafactory = require("https://bundle.run/rdf-data-factory@1.1.0")
Insert cell
Insert cell
engine = require("@comunica/actor-init-sparql-file@1.22.3/index.js").catch(
() => window["newEngine"]
)
Insert cell
Insert cell
jsonld = require("https://cdn.jsdelivr.net/npm/jsonld@1.0.0/dist/jsonld.min.js")
Insert cell
{
const doc = {
"http://schema.org/name": "Manu Sporny",
"http://schema.org/url": { "@id": "http://manu.sporny.org/" },
"http://schema.org/image": {
"@id": "http://manu.sporny.org/images/manu.png"
}
};
const context = {
name: "http://schema.org/name",
homepage: { "@id": "http://schema.org/url", "@type": "@id" },
image: { "@id": "http://schema.org/image", "@type": "@id" }
};
const compacted = await jsonld.compact(doc, context);
const flattened = await jsonld.flatten(doc);
return compacted;
}
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more