Skip to content

Instantly share code, notes, and snippets.

Avatar
🤓

Leigh Dodds ldodds

🤓
View GitHub Profile
@ldodds
ldodds / view.css
Created Jun 7, 2018
kumu advanced view
View view.css
@settings {
template: systems;
connection-color: #686868;
opposite-style: none;
font-color: #000;
font-size: 24;
}
/* Intangible Value */
connection["connection type"="intangible"] {
@ldodds
ldodds / event-with-location.json
Last active May 2, 2018
OpenActive opportunity model examples
View event-with-location.json
{
"@context": "https://www.openactive.io/ns/oa.jsonld",
"type": "Event",
"name": "Tai chi Class",
"description": "A tutored beginner's class that will involve demonstrates and a set of warm-up activities. Everyone welcome",
"id": "http://api.example.org/events/1",
"url": "http://www.example.org/events/1",
"startDate": "2017-03-22T20:00:00Z",
"endDate": "2017-03-22T21:00:00Z",
"duration": "PT60M",
@ldodds
ldodds / custom.jsonld
Last active Jun 3, 2021
Example of a simple custom JSON-LD context
View custom.jsonld
{
"@context":{
"label":"http://www.w3.org/2000/01/rdf-schema#label",
"xsd":"http://www.w3.org/2001/XMLSchema#",
"ext":"http://example.org/jsonld#",
"id":"@id"
},
"ext:myCustomProperty":{
"id":"ext:myCustomProperty",
"label":"This is the label"
View gist:cffbc4bf4a4c639e01b50dd1ab6cde4c
import osmnx as ox
ox.config(log_file=True, log_console=True, use_cache=True)
# configure the inline image display
img_folder = 'images'
extension = 'png'
size = 350
dpi = 120
street_widths = {'footway' : 0.5,
@ldodds
ldodds / open_data_paladin_spells.md
Last active Dec 11, 2018
Spells for open data paladins
View open_data_paladin_spells.md

Spells for Open Data Paladins:

Level 1

  • Resistance: subject gains +1 savings throws against publisher excuses
  • Endure Elements: exist comfortably in XML workflows

Level 2

  • Remove PDF: frees one or more datasets from a document
View pages.csv
We can't make this file beautiful and searchable because it's too large.
"Title","Slug","Catalogue_URL","Catalogue_Id","Start_Date","End_Date","Page","URL","Blank","Date","Main_Performance","Second_Performance"
"A collection of playbills from Theatre Royal, Bath 1812-1818","1812-1818","http://catalogue.bl.uk/primo_library/libweb/action/dlDisplay.do?vid=BLVU1&afterPDS=true&institution=BL&docId=BLL01016661285","vdc_100022589024.0x000002","1815-01-03","1818-12-31",1,"http://playbill-images.datasulis.org/1812-1818/1812-1818_1.jpg",,,,
"A collection of playbills from Theatre Royal, Bath 1812-1818","1812-1818","http://catalogue.bl.uk/primo_library/libweb/action/dlDisplay.do?vid=BLVU1&afterPDS=true&institution=BL&docId=BLL01016661285","vdc_100022589024.0x000002","1815-01-03","1818-12-31",2,"http://playbill-images.datasulis.org/1812-1818/1812-1818_2.jpg",,,,
"A collection of playbills from Theatre Royal, Bath 1812-1818","1812-1818","http://catalogue.bl.uk/primo_library/libweb/action/dlDisplay.do?vid=BLVU1&afterPDS=true&institution=BL&docId=BLL01016661285","vdc_100022589024.0x000002","1815
@ldodds
ldodds / Gemfile
Last active Mar 13, 2017
Dump open banking ATM data to CSV
View Gemfile
source 'https://rubygems.org'
gem 'rest-client'
View output.json
{
"tables" : [
{
"url" : "#<File:0x00000001f98c78>",
"row" : [
{
"url" : "#<File:0x00000001f98c78>#row=2",
"describes" : [
{
"Trim Cycle" : "Large Tree Routine Prune",
@ldodds
ldodds / bath-sq-kms.py
Created Feb 11, 2017
Generating 1sq km images of road network in and around B&NES
View bath-sq-kms.py
import osmnx as ox
ox.config(log_file=True, log_console=True, use_cache=True)
# configure the inline image display
img_folder = 'images'
extension = 'png'
size = 350
dpi = 90
street_widths = {'footway' : 0.5,
View parking.json
[ {
"dateuploaded" : "2016-11-25T13:25:03",
"easting" : "371853",
"occupancy" : "901",
"percentage" : "129",
"name" : "Newbridge P+R",
"description" : "Newbridge P+R / A4 Newbridge Road / P+R / Bath",
"location" : {
"latitude" : "51.3902305335",
"human_address" : "{\"address\":\"\",\"city\":\"\",\"state\":\"\",\"zip\":\"\"}",