Skip to content

Instantly share code, notes, and snippets.

View ldodds's full-sized avatar
🤓

Leigh Dodds ldodds

🤓
View GitHub Profile
@ldodds
ldodds / transport-data.md
Created October 6, 2016 08:33
Types of transport data collected by local authorities and others

Manual roadside counts

Manual counting of traffic by people stood at the side of the road. Typically commissioned to run at a location or date for a specific project.

Will result in counts of traffic, possibly with type of vehicle

Manual roadside counts at intersections

Manual counting of traffic moving through a specific intersection.

@ldodds
ldodds / transport.md
Created October 7, 2016 18:35
Ways to influence transport issues

Solving transport problems

Generally speaking there are only a few broad approaches to dealing with transport problems.

These are:

You can move the traffic

  • Physically
[ {
"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\":\"\"}",
@ldodds
ldodds / bath-sq-kms.py
Created February 11, 2017 15:23
Generating 1sq km images of road network in and around B&NES
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,
{
"tables" : [
{
"url" : "#<File:0x00000001f98c78>",
"row" : [
{
"url" : "#<File:0x00000001f98c78>#row=2",
"describes" : [
{
"Trim Cycle" : "Large Tree Routine Prune",
@ldodds
ldodds / Gemfile
Last active March 13, 2017 17:39
Dump open banking ATM data to CSV
source 'https://rubygems.org'
gem 'rest-client'
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 / open_data_paladin_spells.md
Last active December 11, 2018 18:26
Spells for open data paladins

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
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 / custom.jsonld
Last active June 3, 2021 02:45
Example of a simple custom JSON-LD context
{
"@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"