Skip to content

Instantly share code, notes, and snippets.

{
"@context": "http://iiif.io/api/presentation/3/context.json",
"id": "https://example.org/iiif/book1/manifest",
"type": "Manifest",
"items": [
],
"structures": [
{
"id": "https://example.org/iiif/book1/range/r0",
@baskaufs
baskaufs / example.json
Created January 6, 2021 15:42
example JSON-LD
{
"@context": {
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"skos": "http://www.w3.org/2004/02/skos/core#",
"xsd": "http://www.w3.org/2001/XMLSchema#"
},
"@graph": [
{
"@id": "http://rs.tdwg.org/humbcv/values/e",
@baskaufs
baskaufs / example.sparql
Created December 9, 2020 17:15
example SPARQL query to Wikidata Query Service
select distinct ?prop ?valueNode ?reference ?value ?time where {
wd:Q42352198 ?wdt ?statement.
?statement prov:wasDerivedFrom ?reference.
?reference ?prop ?valueNode.
?valueNode ?p ?time.
}
@baskaufs
baskaufs / response.json
Created December 9, 2020 17:12
Sample response from Wikidata API
{
"claims": {
"P496": [
{
"mainsnak": {
"snaktype": "value",
"property": "P496",
"hash": "dc1d07d37e67ace42c44fc4d93b7f6ac07865c28",
"datavalue": {
"value": "0000-0002-7248-6551",
@baskaufs
baskaufs / csv2rdf.txt
Created November 25, 2020 22:09
minimal output CSV to RDF mapping
rdf serialize --input-format tabular --output-format ttl --metadata csv-metadata.json --minimal > output.ttl
@baskaufs
baskaufs / covid-mask-symptoms.csv
Created October 26, 2020 16:50
Correlation between knowing someone with COVID-19 symptoms and rate of mask use https://www.washingtonpost.com/business/2020/10/23/pandemic-data-chart-masks/
staate pct_symptoms pct_wear_mask
AK 33 82
AL 27 80
AR 30 83
AZ 18 86
CA 15 90
CO 21 85
CT 15 92
DC 11 97
DE 18 93
@baskaufs
baskaufs / tdwg-authors.sparql
Last active October 21, 2020 23:30
Link authors, their identifiers and TDWG standards documents
# run this query at https://sparql.vanderbilt.edu/
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix dcterms: <http://purl.org/dc/terms/>
select distinct ?iri ?name ?document ?title ?standard ?stdName
from <http://rs.tdwg.org/>
where {
?document dcterms:contributor ?iri.
?iri rdfs:label ?name.
?document rdfs:label ?title.
?document dcterms:hasVersion ?version.
@baskaufs
baskaufs / newline.txt
Created October 7, 2020 20:14
File for testing newlines
Create some text here.
There is a newline here.
And here.
@baskaufs
baskaufs / months_list.txt
Created October 7, 2020 17:53
List of months of the year
January
February
March
April
May
June
July
August
September
October
@baskaufs
baskaufs / lorem_ipsum.txt
Created October 7, 2020 17:48
Lorem ipsum
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.