Skip to content

Instantly share code, notes, and snippets.

library(XML)
getMARCField = function(marc_doc, tag, code) {
xpath = paste("/m:collection/m:record/m:datafield[@tag='", tag, "']/m:subfield[@code='", code, "']", sep="")
return(xpathApply(marc_doc, xpath, namespaces=c("m"), xmlValue))
}
vs = xmlRoot(xmlParse('vail-first-3500.xml'))
field100a = getMARCField(vs, '100', 'a')
@dwtkns
dwtkns / README.md
Last active October 19, 2023 16:44
Slippy map + extent indicator
@dwtkns
dwtkns / README.md
Last active April 19, 2020 22:30
Faux-3d Shaded Globe

Faux-3d SVG globe using d3.geo.orthographic and a few radial gradients. Labels offset or hidden based on radians from current map center to enhance the effect.

Uncomment svg.append("g").attr("class","countries") for hover-able country outlines.

@dwtkns
dwtkns / README.md
Last active December 11, 2015 13:38 — forked from dwtkns/README.md
@dwtkns
dwtkns / README.md
Last active December 11, 2015 13:38 — forked from dwtkns/README.md