Skip to content

Instantly share code, notes, and snippets.

Avatar

Matthew Lincoln mdlincoln

View GitHub Profile
View rkm_maps.txt
https://www.rijksmuseum.nl/nl/zoeken?s=chronologic&f=1&p=2&ps=12&f.classification.iconClassIdentifier.sort=25A4&place=Amsterdam&imgonly=True&ii=3
View count_changes.rq
PREFIX gvp: <http://vocab.getty.edu/ontology#>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX tgn: <http://vocab.getty.edu/tgn/>
PREFIX xl: <http://www.w3.org/2008/05/skos-xl#>
SELECT ?concept ?conceptname (COUNT(?changenote) as ?numchanges)
WHERE {
?concept skos:inScheme tgn: .
View europeana_query
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX dbpprop: <http://dbpedia.org/property/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX edm: <http://www.europeana.eu/schemas/edm/>
PREFIX ore: <http://www.openarchives.org/ore/terms/>
View schutters.json
{
"acquisition" : {
"method" : "bruikleen",
"date" : "1808-01-01T00:00:00Z",
"creditLine" : "Bruikleen van de gemeente Amsterdam"
},
"artistRole" : null,
"associations" : [ ],
"catRefRPK" : [ ],
"classification" : {
View eur_data.csv
edmrights provider count
1 <http://www.europeana.eu/rights/rr-f/> 'de Rand' vzw 159
2 <http://creativecommons.org/licenses/by-nc-nd/1.0/> Aarhus Kommunale Biblioteker. Lokalhistorisl Samling. 1
3 <http://creativecommons.org/licenses/by-nc-nd/1.0/> Aarhus Kommunes Biblioteker. Lokalhistorisk Samling, 1
4 <http://creativecommons.org/licenses/by-nc-nd/1.0/> Aarhus Kommunes Biblioteker. Lokalhistorisk Samling. 12
5 <http://creativecommons.org/licenses/by-nc-nd/1.0/> Aarhus Kommunes Biblioteker. Lokalhistorisl Samling. 1
6 <http://creativecommons.org/licenses/by-nc-nd/1.0/> Aarhus Kommunes Biblioteker. Lokalhistorsk Samling. 1
7 <http://www.europeana.eu/rights/rr-f/> Accademia Nazionale di Santa Cecilia 5000
8 <http://www.europeana.eu/rights/rr-f/> Alex Vella Gera 225
9 <http://creativecommons.org/publicdomain/mark/1.0/> American Farm School of Thessaloniki Historical Archives 1007
View sparql.R
library(SPARQL)
rights_query <- 'PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX edm: <http://www.europeana.eu/schemas/edm/>
PREFIX ens: <http://www.europeana.eu/schemas/edm/>
PREFIX ore: <http://www.openarchives.org/ore/terms/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT DISTINCT ?edmrights ?provider (COUNT(*) as ?count)
View load_fixed_width.R
library("mvbutils")
path <- "state07_DE.txt"
col.widths <- c(6, 4, 2, 4)
table.header <- c("COOP.ID", "YEAR", "MONTH", "ELEMENT")
for(i in 1:31) {
new.widths <- c(5, 1, 1, 1)
new.header <- c(paste("VALUE",i, sep=""),
paste("MFLAG",i, sep=""),
@mdlincoln
mdlincoln / coins.html
Last active Aug 29, 2015
Add bibliographic metadata via COinS (http://ocoins.info/) to your Jekyll blog with this _include snippet
View coins.html
<span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Adc&amp;rft.title={{ page.title | cgi_escape }}&amp;rft.aulast={{ site.data.contact.name_last | cgi_escape }}&amp;rft.aufirst={{ site.data.contact.name_first | cgi_escape }}&amp;rft.source={{ site.data.site.title | cgi_escape }}&amp;rft.date={{ page.date | date_to_xmlschema }}&amp;rft.type=blogPost&amp;rft.format=text&amp;rft.identifier={{ site.url | cgi_escape }}{{ page.url | cgi_escape }}&amp;rft.language=English"></span>
@mdlincoln
mdlincoln / iconclass_atomic
Last active Dec 21, 2015
This is an attempt to define a regular expression that will capture the various particles of an Iconclass notation in its match groups. The Iconclass schema is described here: http://www.iconclass.nl/contents-of-iconclass
View iconclass_atomic
(\d{1,2})([A-Z]{1,2})?(\d{1,5})?(\(\w*\))?(\d{1,2})?(\(\+\d\))?