Skip to content

Instantly share code, notes, and snippets.

{"ArrayOfObjTrainPositions":{"objTrainPositions":[{"TrainStatus":"N","TrainLatitude":"51.9212","TrainLongitude":"-8.17579","TrainCode":"P275","TrainDate":"19 Aug 2012","PublicMessage":"P275\\nMidleton to Cork\\nExpected Departure 16:45","Direction":"To Cork"},{"TrainStatus":"N","TrainLatitude":"52.6587","TrainLongitude":"-8.62397","TrainCode":"A433","TrainDate":"19 Aug 2012","PublicMessage":"A433\\nLimerick to Limerick Junction\\nExpected Departure 16:55","Direction":"To Limerick Junction"},{"TrainStatus":"R","TrainLatitude":"52.1396","TrainLongitude":"-8.65521","TrainCode":"A216","TrainDate":"19 Aug 2012","PublicMessage":"A216\\n14:00 - Dublin Heuston to Cork (0 mins late)\\nDeparted Mallow next stop Cork","Direction":"To Cork"},{"TrainStatus":"R","TrainLatitude":"52.1396","TrainLongitude":"-8.65521","TrainCode":"A306","TrainDate":"19 Aug 2012","PublicMessage":"A306\\n14:45 - Cork to Tralee (13 mins late)\\nDeparted Mallow next stop Banteer","Direction":"To Tralee"},{"TrainStatus":"R","TrainLatitude":"52.500
Stop number Name without locality Locality Locality number Code Name NaPTAN stop class NaPTANId Easting Northing
1 Pearse Street (Pearse Avenue) Sallynoggin E0825024 ->NE2 Stop No. 3234 BCT 8250DB003234 724091 726427
1 Pearse Street (Pearse Avenue) Sallynoggin E0825024 ->SW1 Stop No. 3210 BCT 8250DB003210 724087 726412
2 Lr. Drumcondra Road Drumcondra (Dublin) E0822021 1 Drumcondra Road Lower BCT 825000101 715947 736197
2 Lr. Drumcondra Road Drumcondra (Dublin) E0822021 2 Drumcondra Road Lower BCT 8250B1001201 715929 736199
3 Clontarf Road Junction Strandville Avenu Clontarf E0822038 1 Stop No. 1741 BCT 8220DB001741 718428 736222
4 College Green Dublin City South E0822091 1 Taxi Rank TXR 8220TR000078 715797 734107
4 College Green Dublin City South E0822091 2 Stop No. 1359 BCT 8220DB001359 715770 734095
4 College Green Dublin City South E0822091 3 College Green BCT 825000157 715769 734095
4 College Green Dublin City South E0822091 4 Stop No. 4522 BCT 8220DB004522 715821 734081
Apologies couldn't actually find you email so figured I would send it like this....
Hi David – Hope the move from Boston is going well!
I was thinking of something that might be useful / interesting to persue.
Basically the idea I had was taking the Dublin transport network and basically you would be able to drop a pin on the map and it will tell you how far you can travel within 15, 30 and 45 minutes. You would also be able to adjust the search by restricting it to the more frequent routes and what not.
I assume this would be simple enough if it was constrained to how far can I travel on say route 16 in 30 minutes, but would become much more complex once you introduced changing between a service?
# Create the S4 Class Trajectory
setClass("Trajectory", representation(x = "numeric", y = "numeric", time = "numeric"))
#make a new object with class Trajectory
colin <- new("Trajectory", x = 21.5, y = 21.5, time = 1200)
# create the S4 Class TrajectoryExtra which includes the Trajectory class
setClass("TrajectoryExtra", representation(speed = "numeric", direction = "numeric"), contains = "Trajectory")
colin1 <- new("Trajectory", x = c(0:10), y = c(20:30), time = c(1200:1210))
@rustyb
rustyb / IE windfarms Bufferes.md
Last active August 29, 2015 14:01
This gist contains the queries used to make the vizualisations used in my blog post on natura 2000 sites within 5-10km of a wind turbine in Ireland.

Below you will find the queries I ran in order to make the buffers around the wind turbine points and also to show the sites within these buffers.

make 10km buffers around windturbines

SELECT cartodb_id, ST_Transform(ST_Buffer(the_geom::geography,10000)::geometry, 3857) as the_geom_webmercator FROM ie_windfarms_osm

make 5km buffers around windturbines

SELECT cartodb_id, ST_Transform(ST_Buffer(the_geom::geography,5000)::geometry, 3857) as the_geom_webmercator FROM ie_windfarms_osm
@rustyb
rustyb / map.geojson
Created July 2, 2014 14:32
This a geojson file for the locations of CocaCola Bike Stations in Cork, Ireland
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rustyb
rustyb / map.geojson
Created July 2, 2014 15:13
This a geojson file for the locations of CocaCola Bike Stations in Galway, Ireland
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rustyb
rustyb / index.html
Last active August 29, 2015 14:03 — forked from anonymous/index.html
<!doctype><html><head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Odyssey.js Slides</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/x-icon" href="http://cartodb.github.io/odyssey.js/sandbox/favicon.png">
<link rel="icon" type="image/png" href="http://cartodb.github.io/odyssey.js/sandbox/favicon.png">
@rustyb
rustyb / reg1.py
Created October 26, 2014 22:09
Regression Scripts to get R squared values
"""
Author: Colin Broderick
DESC:
Script to get linear regressions of station trips counts in NYC/London.
"""
import pandas as pd
import numpy as np
import scipy as sp
import scipy.stats
import argparse
@rustyb
rustyb / LesothoUserChanges.csv
Created March 19, 2015 16:02
Punchcard for Lesotho OSM Mappers
user mon tue wed thu fri sat sun total
4rch 0 0 0 9.0 0 0 0 9.0
AE35 11.0 4.0 1.0 3.0 1.0 1.0 1.0 22.0
Adrian Frith 0 0 1.0 0 0 1.0 0 2.0
Alecs01 0 0 0 0 0 1.0 0 1.0
Alex24223 0 1.0 0 0 0 0 0 1.0
AnyFile 1.0 0 0 0 0 0 1.0 2.0
AtomLaw 6.0 9.0 7.0 0 0 0 1.0 23.0
Aurimas Fišeras 0 2.0 1.0 0 0 1.0 0 4.0
Bacash 0 0 1.0 0 0 0 0 1.0