Skip to content

Instantly share code, notes, and snippets.

import datetime
import json
import requests
from requests_oauthlib import OAuth2Session
from oauthlib.oauth2 import BackendApplicationClient
from config import client_id, client_secret, refresh_token
def run():
<snippet>
<content><![CDATA[import pdb; pdb.set_trace()]]></content>
<tabTrigger>pdb</tabTrigger>
<scope>source.python</scope>
<description>import pdb</description>
</snippet>
<!-- USAGE -->
<!-- 1. Go to Tools -> New Snippet -->
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

NOTE: GIVE DATA 5+ SECONDS TO LOAD.

The above figure allows relationships between the "year created", "seating capacity", elevation, longitude and latitude of Roman amphitheaters to be explored. The data is incomplete, though it is being regularly expanded and improved.

Drag your mouse along the axes to define ranges of interest. Hover over a blue line to which amphitheater it represents.

The data is compiled on-the-fly by this [query](http://sparql.org/sparql?query=PREFIX+dc%3A+%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0D%0APREFIX+dbp%3A+%3Chttp%3A%2F%2Fdbpedia.org%2Fproperty%2F%3E%0D%0APREFIX+ex%3A+%3Chttp%3A%2F%2Fexample.org%2F%3E%0D%0APREFIX+geo%3A+%3Chttp%3A%2F%2Fgeovocab.org%2Fgeometry%23%3E%0D%0APREFIX+rdf%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0D%0APREFIX+rdfs%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0ASELECT+%3Fname+%3Fyear_created+%3Fseating_capacity+%3Felevation+%3Flongitude+%3Flatitude%0D%0AFROM+%3Chttp%3A%2F%2Frdf.greggkellogg.net%2Fdistille

From original gist: "An interactive version of a Reingold–Tilford tree. Click on the nodes to expand or collapse."

Code from mbostock. Data from wikipedia.

Quoting mbostock's description of what's going on here, "The tree layout implements the Reingold-Tilford algorithm for efficient, tidy arrangement of layered nodes. The depth of nodes is computed by distance from the root, leading to a ragged appearance. Cartesian orientations are also supported. Implementation based on work by Jeff Heer and Jason Davies using Buchheim et al.'s linear-time variant of the Reingold-Tilford algorithm."

name Terminus post quem Terminus ante quem No. of Works in MS Position of Piers Lines of Piers Percent MS Piers Occupies Dist from Malvern Textual Variety
Trinity College Dublin 212 D.4.1 1390 1400 1 1 7345 96.7 30 5
Cambridge University Library Dd.3.13 1390 1400 1 1 7347 100 30 5
Bodley MS 851 1390 1400 6 6 1300 11.5 10 8
Bodley MS Poet.a.1 1398 1403 40 30 2429 4.5 60 1
Cambridge University Library Dd.1.17 1398 1403 23 18 7311 7.3 30 3
Corpus Christi College Oxford 201 1398 1403 1 1 7364 95.6 180 3
Bodley MS Laud 581 1398 1403 1 1 7302 97.8 10 3
Bodley MS Rawlinson Poet. 38 1398 1403 1 1 7312 95.3 20 3
Bodley MS Laud 656 1398 1403 5 2 7347 76 60 5
Trinity College Dublin 212 D.4.1 1390 1400 1 1 7345 96.7 30 5
Cambridge University Library Dd.3.13 1390 1400 1 1 7347 100 30 5
Bodley MS 851 1390 1400 6 6 1300 11.5 10 8
Bodley MS Poet.a.1 1398 1403 40 30 2429 4.5 60 1
Cambridge University Library Dd.1.17 1398 1403 23 18 7311 7.3 30 3
Corpus Christi College Oxford 201 1398 1403 1 1 7364 95.6 180 3
Bodley MS Laud 581 1398 1403 1 1 7302 97.8 10 3
Bodley MS Rawlinson Poet. 38 1398 1403 1 1 7312 95.3 20 3
Bodley MS Laud 656 1398 1403 5 2 7347 76 60 5
{
"name": "Mummy of Artemidora",
"start date":90,
"end date":100,
}