Skip to content

Instantly share code, notes, and snippets.

View ldodds's full-sized avatar
🤓

Leigh Dodds ldodds

🤓
View GitHub Profile
@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,
[ {
"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 / 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
@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.

var id = window.location.href.match(/\/doc\/([0-9]+)\//)[1]
window.location.href = "https://www.scribd.com/document_downloads/" + id + "?extension=pdf&from=embed&source=embed"
@ldodds
ldodds / git-blame-club.txt
Created April 14, 2016 10:47
Git Blame Club
Welcome to Git Blame Club.
The first rule of Git Blame Club is: you do not blame other people.
The second rule of Git Blame Club is: you DO NOT blame other people!
Third rule of Fight Club: if someone yells "CONFLICT!", goes limp, or taps out, the blaming is over.
Fourth rule: only two branches to a merge.
Fifth rule: one merge at a time, everyone.
Sixth rule: the merges are command-line. No editors, no GUIs.
Seventh rule: merges will go on as long as they have to.
And the eighth and final rule: if this is your first day at Git Blame Club, you have to commit.
{
"title": "Burkina Faso",
"version": "1.1.2",
"type": "FeatureCollection",
"copyright": "Copyright (c) 2015 Highsoft AS, Based on data from Natural Earth",
"copyrightShort": "Natural Earth",
"copyrightUrl": "http://www.naturalearthdata.com",
"crs": {
"type": "name",
"properties": {
@ldodds
ldodds / test
Created November 29, 2015 14:50
{
"title":"Burkina Faso",
"version":"1.1.2",
"type":"FeatureCollection",
"copyright":"Copyright (c) 2015 Highsoft AS, Based on data from Natural Earth",
"copyrightShort":"Natural Earth",
"copyrightUrl":"http://www.naturalearthdata.com",
"crs":{
"type":"name",
"properties":{
@ldodds
ldodds / bath-unchained.py
Created November 2, 2015 20:35
Quick hack to explore creating Joy Division style album cover from LIDAR data
#Bath Unchained
#
#based on original: http://matplotlib.org/examples/animation/unchained.html
#
#pass the script a path to a ASC file, e.g after unpacking the EA data I ran
#
#python bath-unchained.py LIDAR-DSM-1M-ST76/st7465_DSM_1m.asc
#
#output: https://twitter.com/ldodds/status/661279776292929536
import sys
@ldodds
ldodds / fixed-schema.json
Created June 2, 2015 20:30
Fixed up schema from csvlint bug report
{
"fields": [
{
"name": "Store Code",
"constraints": {
"required": true,
"type": "http://www.w3.org/TR/xmlschema-2/#string",
"unique": true,
"maxLength": 10
}