Skip to content

Instantly share code, notes, and snippets.

View acrymble's full-sized avatar

Adam Crymble acrymble

  • London
View GitHub Profile
@acrymble
acrymble / map&timeline2.html
Created October 13, 2012 10:17
Synchronized Map and Timeline HTML code 2
<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) options: { eventIconPath: "../images/" }, datasets: [ { title: "London Publishers", theme: "blue", type: "kml", // Data to be loaded in KML - must be a local URL options: { url: "mycollection.kml" // KML file to load } } ], bandInfo: [ { width: "85%", intervalUnit: Timeline.DateTime.YEAR, intervalPixels: 100 }, { width: "15%", intervalUnit: Timeline.DateTime.DECADE, intervalPixels: 150, showEventText: false, trackHeight: 0.2, trackGap: 0.2 } ] }); }); </script>
@acrymble
acrymble / map&timeline.html
Created October 13, 2012 10:16
Synchronized Map and Timeline HTML code
<!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> <link href="examples.css" type="text/css" rel="stylesheet"/> <style> div#timelinecontainer{ height: 310px; } div#mapcontainer{ height: 300px; } </style> </head> <body> </body> </html>
@acrymble
acrymble / KML example 3
Created October 13, 2012 10:14
KML Example file 3
<?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom"> <Document> <Folder> <name>Cheap London Publishers</name> <description>Penny-blood publishers in early-Victorian London.</description> <atom:author> <atom:name>Marie Léger-St-Jean</atom:name> </atom:author> <Placemark> <name>Simple placemark</name> <TimeStamp> <when>1845</begin> </TimeStamp> <description>Attached to the ground. Intelligently places itself at the height of the underlying terrain.</description> <Point> <coordinates>-122.0822035425683,37.42228990140251</coordinates> </Point> </Placemark> </kml>
@acrymble
acrymble / KML example 2
Created October 13, 2012 10:14
KML Example file 2
<?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://www.opengis.net/kml/2.2"> <Placemark> <name>Simple placemark</name> <TimeStamp> <when>1845</begin> </TimeStamp> <description>Attached to the ground. Intelligently places itself at the height of the underlying terrain.</description> <Point> <coordinates>-122.0822035425683,37.42228990140251</coordinates> </Point> </Placemark> </kml>
@acrymble
acrymble / KML example
Created October 13, 2012 10:13
KML Example file
<?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://www.opengis.net/kml/2.2"> <Placemark> <name>Simple placemark</name> <TimeSpan> <begin>1845</begin> <end>1847</end> </TimeSpan> <description>Attached to the ground. Intelligently places itself at the height of the underlying terrain.</description> <Point> <coordinates>-122.0822035425683,37.42228990140251</coordinates> </Point> </Placemark> </kml>
@acrymble
acrymble / gist:3601896
Created September 2, 2012 17:27
MALLET output
0 0.02995 xi ness regular asia online cinema established alvida acclaim veenr commercial
@acrymble
acrymble / gist:3601885
Created September 2, 2012 17:26
MALLET example
bin\mallet train-topics --input tutorial.mallet --num-topics 20 --optimize-interval 20 --output-state topic-state.gz --output-topic-keys tutorial_keys.txt --output-doc-topics tutorial_composition.txt
@acrymble
acrymble / gist:3601875
Created September 2, 2012 17:26
MALLET optimize interval
--optimize-interval 20
@acrymble
acrymble / gist:3601788
Created September 2, 2012 17:21
train topics and save MALLET
bin\mallet train-topics --input tutorial.mallet --num-topics 20 --output-state topic-state.gz --output-topic-keys tutorial_keys.txt --output-doc-topics tutorial_compostion.txt
@acrymble
acrymble / gist:3601756
Created September 2, 2012 17:18
Sample Topic Model
0 5 test cricket Australian hill acting England northern leading ended innings record runs scored run team batsman played society English