When? Investigating the temporal entities in a corpus

Max Kemman
University of Luxembourg
November 8, 2015

Online slides optimised for Full-HD screens in full-screen mode
Download PDF here

Doing Digital History: Introduction to Tools and Technology

Recap - Assignment

How did the assignment go?

What did you think of the tool used?

Could this be useful for your research?

Recap from last time

  • What were 4 steps of text normalization?
  • What do precision & recall mean in searching words in texts?

Today

  • The Next W
  • Timelines
  • Representing the data
  • CSS
  • Next time

The next W

Everything happens at some time

"When" is not a strange question to most historians

Why when?

Allows to focus on a specific period

Allows to focus on a specific event and the events that led to this

Makes change visible

The when of a corpus

Given a corpus, multiple when-questions available

  • When did the described events occur
  • When were the sources written
  • When was this corpus created

These can all be described as moments (such as dates) or as periods

Describing the events or period

Different methods are possible

Timelines

A visual representation of events

The horizontal line

The X-axis represents time

The simplest model: add points with descriptions on this line

life of Benjamin Franklin

(Source)

Exercise:

  1. Take pen and paper
  2. Draw a horizontal line where the start is your birth and the end is today
  3. Fill in the major events in your life by adding them to the line
  4. Fill in less major events until the line is full
  5. Compare with your neighbours

Digitally: https://timeline.knightlab.com/

A more visual timeline

Defining an Y-axis

Closeness of entities

A quantitative Y-axis

Things to note:

  • Y-axis is a quantitative value
  • Allows to see change over time
  • Values summarized per year rather than per case

Percentages

(Source)

Longitudinal perspective

Next slides based on: http://ourworldindata.org/data/war-peace/war-and-peace-before-1945/

Combinations with other factors such as maps

Representing the data

Events can be easily represented in lists

Quantitative data more easily represented in tables

Less discrete values

Computers sometimes assume standard time descriptions: YYYY-MM-DDThh:mm:ss

How to represent and compare:

  • Uncertainty: Circa 1300
  • Between 200,000-300,000
  • Periods: Between 1450-1500

Is the data complete?

Are the numbers comparable?

What do the numbers tell?

(Source)

CSS

You have now written reports in HTML

Let's try to make those report prettier

Let's do a little about

  • The background
  • The headers
  • The font colours
  • The link colours

Remember: what is a web page?

Many web pages consist of:

  • HTML - the content
  • CSS - the styling
  • Javascript - additional functionality

Moreover, there is PHP which generates web pages on request

HTML elements

Remember we added all kinds of HTML elements to the body, such as

  • Headers: <h1>
  • Paragraphs: <p>
  • Some text-transformations: <b> and <i>
  • Links: <a>

These elements are key for styling with CSS

Selecting HTML elements to style

(Source)

  1. The CSS begins by selecting the HTML element
  2. Then a property of the element is selected
  3. Finally, the property is given a value

CSS file

Create a file pretty.css and link to it from the HTML document

<!doctype html>
<html>
	<head>
		<title>This document now has a title </title>
		<link rel="stylesheet" type="text/css" href="pretty.css">
	</head>
	<body>
	</body>
</html>

Background

Select the element <body> and the property background-color

body {
background-color: #425e5f;
}

Other elements

We can add more elements to the CSS file, such as the headers

body {
background-color: #425e5f;
}

h1 {
font-size: 45px;
}

h2 {
font-size: 30px;
}

h3 {
font-size: 30px;
}

Combining elements

When two elements' properties get the same values, these can be combined

h2 {
font-size: 30px;
}

h3 {
font-size: 30px;
}

Can be written as:

h2, h3 {
font-size: 30px;
}

Overruling

We can change the colour for all text as property of the <body> element

body {
background-color: #425e5f;
color: #ffffff;
}

We can overrule with more specific text-elements such as <h1>

body {
background-color: #425e5f;
color: #ffffff;
}

h1 {
color: #FF0000;
} 

The two files

<!doctype html>
<html>
	<head>
		<title>This document now has a title </title>
		<link rel="stylesheet" type="text/css" href="css overruling.css">
	</head>
	<body>
		<h1>The largest header, useful for chapter titles</h1>
		<p>A paragraph where you can write all you want, in <i>italicAnother paragraph where you can write <br> 
		<a href="http://isitfridayyet.net/" target="_blank">This is the text people click to a new tab</a></p>
	</body>
</html>
body {
background-color: #425e5f;
color: #ffffff;
}

h1 {
color: #FF0000;
} 

Result

body {
background-color: #425e5f;
color: #ffffff;
}

h1 {
color: #FF0000;
} 

For next time

15 November

When? Quantitative history

Reading: (see Moodle)

  • Guldi, J., & Armitage, D. (2014). Big questions, big data. Chapter 4 in The History Manifesto. Cambridge: Cambridge University Press.