This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This Python programme will let you find pre-defined keywords in a series of entries. | |
#Written by Adam Crymble 2 March 2015, for Intro to Digital History class, University of Hertfordshire | |
#[email protected] | |
#Import the keywords | |
f = open('keywords.txt', 'r') | |
allKeywords = f.read().lower().split("\n") | |
f.close() | |
#Import the texts you want to search |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Angesse | |
Anglesea | |
Anglesey | |
Bedford | |
Bedfordshire | |
Beds | |
Berks | |
Berkshire | |
Brecknock | |
Brecknockshire |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Short Python programme, written by Adam Crymble - [email protected] | |
#for the Digital Histories Workshop module at the University of Hertfordshire | |
#I am assuming that you have already read and completed the 'Python Introduction and Installation' tutorial | |
#from the Programming Historian: http://programminghistorian.org/lessons/introduction-and-installation | |
#September 2014. | |
#note that lines beginning with the # symbol are comments for you the student. | |
#The computer will ignore these. | |
#read through them all carefully before you try running the programme. | |
#Afterwards, if you find these comments distracting, feel free to delete them. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// array of ExtendedData elements to look for extendedData: ["category", "theme"], // Transform Function to do some magic: // read the category and use it to set the "theme" // property of the object, which will change the color // and icons used to display it. transformFunction: function(item) { // item is the raw loaded data from the spreadsheet record. // the magic is done in the getThemeFromData function // defined earlier: var theme = getThemeFromData(item); // now asociate the theme permanently with the // item by setting its options.theme attribue item.options.theme = theme; // we're finished with the transform -- now we have to give // our modified item back to TimeMap to make use of: return item; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tm; function getThemeFromData(thisItem) { var category = thisItem.options.category; lookupTable = { "Booksellers' Protection Society": "blue", Lloyd: "red", "London Union of Vendors of Useful Knowledge, Male and Female": "green", "Pierce Egan": "orange" }; if (lookupTable.hasOwnProperty(category)) { return lookupTable[category]; } else { return "purple"; } } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ExtendedData> <Data name="category"> <value>Pierce Egan</value> </Data> </ExtendedData> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ type: "basic", options: { items: [ { overlay : { north: 51.5158290192017, south: 51.513208079467, east: -0.115447746376376, west: -0.119289352205778, image: "81005295.png" } } ] } } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title>London Publishers</title> <script src="http://maps.google.com/maps?file=api&v=3" type="text/javascript"></script> <script type="text/javascript" src="../lib/jquery-1.6.2.min.js"></script> <script type="text/javascript" src="../lib/mxn/mxn.js?(google)"></script> <script type="text/javascript" src="../lib/timeline-1.2.js"></script> <script src="../src/timemap.js" type="text/javascript"></script> <script src="../src/param.js" type="text/javascript"></script> <script src="../src/loaders/xml.js" type="text/javascript"></script> <script src="../src/loaders/kml.js" type="text/javascript"></script> <script type="text/javascript"> var tm; $(function() { tm = TimeMap.init({ mapId: "map", // Id of map div element (required) timelineId: "timeline", // Id of timeline div element (required) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title>London Publishers</title> <script src="http://maps.google.com/maps?file=api&v=3" type="text/javascript"></script> <script type="text/javascript" src="../lib/jquery-1.6.2.min.js"></script> <script type="text/javascript" src="../lib/mxn/mxn.js?(google)"></script> <script type="text/javascript" src="../lib/timeline-1.2.js"></script> <script src="../src/timemap.js" type="text/javascript"></script> <script src="../src/param.js" type="text/javascript"></script> <script src="../src/loaders/xml.js" type="text/javascript"></script> <script src="../src/loaders/kml.js" type="text/javascript"></script> <script type="text/javascript"> var tm; $(function() { tm = TimeMap.init({ mapId: "map", // Id of map div element (required) timelineId: "timeline", // Id of timeline div element (required) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="help"> <h1>London Cheap Literature Publishers, 1837-1860</h1> <p>Publishers of penny bloods were concentrated mainly in two areas: around the Strand and around Paternoster Row. Edward Lloyd, the newcomer who became incredibly successful first had his office far East in Shoreditch, on Curtain Road. He quickly moved closer.</p> </div> <div id="timemap"> <div id="timelinecontainer"> <div id="timeline"></div> </div> <div id="mapcontainer"> <div id="map"></div> </div> </div> |
NewerOlder