Skip to content

Instantly share code, notes, and snippets.

@shawngraham
shawngraham / gist:7efd64c08a94c39a593f
Last active August 29, 2015 14:15
CND-topic-model-with-guidance.rmd
---
title: "Topic Modeling the Colonial Newspaper Database"
author: "Shawn Graham"
date: "February 17, 2015"
output: html_document
---
In [Module 3](https://github.com/hist3907b-winter2015/module3-wranglingdata), we used TEI to mark up primary documents. Melodee Beals has been using TEI to markup newspaper articles, creating the [Colonial Newspapers Database](https://github.com/mhbeals/Colonial-Newspaper-Database) (which she shared on github). We then used Github Pages and an XLST stylesheet to convert that database into a table of comma-separated values <https://raw.githubusercontent.com/shawngraham/exercise/gh-pages/CND.csv>. We are now going to topic model the text of those newspaper articles, to see what patterns of discourse may lie within.
# Getting Started
@shawngraham
shawngraham / geolooting.geojson
Created February 19, 2015 13:57
looting tweets
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shawngraham
shawngraham / id.txt
Created February 19, 2015 14:07
list of 'looting' tweets by id - use TWARC hydrate command to get the original tweets again (thus complying with twitter tos)
id
568407121496137000
568407114378395000
568407104077193000
568407096242253000
568407089673957000
568407069016981000
568407057214234000
568406964599791000
568406941086527000
@shawngraham
shawngraham / geolooting-russian.geojson
Created February 19, 2015 14:13
geolocated tweets with russian 'мародерство' ('looting')
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shawngraham
shawngraham / antiquities.geojson
Created February 19, 2015 20:24
antiquities via twarc, geotagged
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shawngraham
shawngraham / geolootedtweets.json
Created February 19, 2015 22:51
'looted' search on twitter, geolocated tweets
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shawngraham
shawngraham / lootgeo.geojson
Created February 21, 2015 00:11
looting etc
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shawngraham
shawngraham / index.html
Created February 22, 2015 16:28
d3-topic-model
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.node {
font: 300 11px "Helvetica Neue", Helvetica, Arial, sans-serif;
fill: #bbb;
}
.node:hover {
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

#Notes re A Quick CartoDB Intro

more to follow

  • create an account.

  • create new map

  • click on add data (looks as if it's upload, but you can also post the url to csv, geojson etc).