When? Quantitative history Max Kemman University of Luxembourg November 23, 2015 Online slides optimised for Full-HD screens in full-screen mode Download PDF here Doing Digital History: Introduction to Tools and Technology
Today • CSS • Quantitative data • Quantitative history • Next time • Assignment
CSS Last week we changed the background Let's look a bit more at what CSS does
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
Last week We selected the element <body> and the property background-color body background-color #425e5f The largest header, useful for chapter titles The largest header, useful for chapter titles A paragraph where you can write all you want, in italic or bold . A paragraph where you can write all you want, in italic or bold . A subsection's header A subsection's header Another paragraph where you can write Another paragraph where you can write This is the text people click to a new tab This is the text people click to a new tab
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 The largest header, useful for chapter titles The largest header, useful for A paragraph where you can write all you want, in italic or bold . chapter titles A subsection's header A paragraph where you can write all you want, in italic or bold . Another paragraph where you can write This is the text people click to a new tab A subsection's header Another paragraph where you can write This is the text people click to a new tab
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 HTML <!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 CSS body background-color #425e5f color #ffffff h1 color #FF0000
Result body background-color #425e5f color #ffffff h1 color #FF0000 The largest header, useful for chapter The largest header, useful for chapter titles titles A paragraph where you can write all you want, in italic or bold . A paragraph where you can write all you want, in italic or bold . A subsection's header A subsection's header Another paragraph where you can write Another paragraph where you can write This is the text people click to a new tab This is the text people click to a new tab
One more thing on HTML: special characters http://www.ascii.cl/htmlcodes.htm Find the symbol and the HTML number é & ü -> � & � é & ü -> é & ü In your HTML, write longue durée to write longue durée
Quantitative data For your next assignment you will download quantitative data to analyze http://data.worldbank.org We will browse the data by country, let's look up Luxembourg
Data formats There are three data formats: 1. Excel 2. XML 3. CSV We will be using the CSV file lux_Country_en_csv_v2.csv But also download the Excel file just in case
CSV Comma Separated Values, is an open standard Last week we represented data in a table 1960 1970 1980 Luxembourg property 1.2 1.4 2.0 In CSV : "","1960","1970","1980" "Luxembourg property","1.2","1.4","2.0"
Why make it so difficult? Because CSV is a standard: • Many programs can read it • Not dependent on any one commercial program • It will still be readable in many years
Entering the data into Google Drive Go to http://drive.google.com, log in, and click the big red "NEW" button and select "File upload"
Find the file on your hard drive, select, and click " Open " to upload it to Google Drive When your Google Drive is in English you can select the CSV, otherwise the Excel-file will work better
Find the file in your Google Drive, right-click, select " Open with " and select Google Sheets
Google Sheets should now open a nicely ordered sheet as shown here. To clean it up, select the first 4 rows, right-click, and select delete
Select the first 2 columns, right- click, and select delete
Select the 2nd column with Indicator Codes, right-click, and select delete
Select the 1st row with the years and copy using ctrl+c (Windows) or cmd+c (Apple)
Click the + in the lower-left corner (encircled) to create a new sheet, and paste the row here using ctrl+v (Windows) or cmd+v (Apple)
To search in the first sheet, select it at the bottom, and use ctrl+f (Windows) or cmd+f (Apple) to search for gdp (current US$). Select and copy it
After copying the row with gdp (current US$), go to your new sheet and paste
Creating a timeline in Google Sheets Select the two rows by dragging your mouse from the 1 in row 1 to the 2 in row 2
Select " Insert " in the menu bar and select " Chart... "
Google Sheets will suggest several charts. Choose the second line-chart and select " Insert " When your chart looks completely different even though you use the same property, and you have tried with the CSV, go back and upload the Excel file instead
Go back to your first sheet and search for "electric power" to find the row electric power consumption (kWh per capita). Select this row and copy
Paste the row in the new sheet under the rows you have. The chart should be updated automatically
The 2 properties have very different values. Hold mouse on the second line until you see " Edit series ", and select the _l symbol (encircled) to create a second y- axis
You should now see 2 lines that you can compare. Change the x- axis title by clicking it and enter "Year"
Press enter to apply
To edit the chart further, select the chart and click the triangle in the upper-right corner and select " Advanced edit... "
In this window you can further customize the chart
One interesting visual change is to select " Smooth ". Click " Update " once you're done
Sharing the Google Sheet To share the Google Sheet, click the big blue " Share " button in the top-right corner and click " Get shareable link "
The sharing window will now show a URL you can copy-paste into your report.
When you click the dropdown " Anyone with the link can view " you are provided other options
To share only the chart, you can click the triangle in the upper- right corner and select " Save image "
Quantitative history Why would we want to analyse history by the numbers?
Longue Durée Last week you analysed a period of 4 years What if you want to analyse: • 40 years? • 400 years? • 4,000 years? • 40,000 years? Cannot focus on all the stories, need for something else
Cliometrics [T]he study of History through the history of things that can be quantitatively measured – wealth, goods, and services that were taxed and recorded, and population. Guldi & Armitage, p97
Historical variables Patrick Manning in "Big Data in History"
The story of a long period Represent a long period by its numbers [F]ew have used the two together, applying tools designed to analyse large troves of resources to questions about our long-term past and long-term future. Guldi & Armitage, p95
Causality? Big data enhance our ability to grapple with historical information. They may help us to decide the hierarchy of causality – which events mark watershed moments in their history, and which are merely part of a larger pattern. Guldi & Armitage, p89 But from our discussion of Big Data, we focused on correlation
Comparisons and correlations It could be interesting to see: • How two properties evolve over time: are they correlated? • Compare between two or more different countries for the same property
Recommend
More recommend