Coding the Humanities
Jan Hein Hoogstad & Marijn Koolen
THATCamp 2015
28/01/2015
Utrecht University
Programme
I. Programming and the Humanities
II. Hands-on JavaScript
Brief Survey
- what do you hope to get from this?
- why are you here?
Motivation
- Why are we doing this?
- Unwarranted fear or wariness of programming in the Humanities
- Address ownership of tools and collaboration
- each research question requires specific tools
Coding
- Coding as a form of arguing
- programmatic approach to digital research
Data Visualisation
- 7 steps of data visualisation
- Today we discuss three:
- acquiring data
- transforming data
- visualising data
Web as Data
- Web pages structured with HTML
- HyperText Markup Language
- Pages are documents with elements
- DOM: Document Object Model
Document Object Model
Console
- Programmatic access to HTML via console
- Modern browsers all have JavaScript console
- JavaScript is native language of the web
- We will use console for programming
JavaScript?
- Online Databases give "documents" in JSON or XML format
- JSON is JavaScript Object Notation
- JavaScript is language of choice
Acquiring Data
- API gives programmatic access to databases
- Application Programmer Interface
- Many datasets available via APIs
- KB has many: Dataservices / APIs
- Get data using REST queries
REST Queries
- REST queries are URLs that contain request
- Consist of two parts separated by ?
- base URL identifies the API
- query string formulates request
Bar Chart
- get info on paintings by Karel Appel from Rijksmuseum API
- create HTML element for each place of production
- set element size based on number of paintings produced
- add elements to HTML document
Endless Possibilities
- With a few more steps and some imagination: