(rub) public transport map

idea

moving to a new city is not an easy thing. most often you have not only to decide on the neighborhood (funny looking, strange, posh), but have also to find out how long it takes to get to the place you daily visit (university/workplace etc). to get a rough overview, i decided to hack a script that will sample a given section of gps-coordinates regularly and determine (by use of public public transport system servers) how long it roughly takes to get to the place you want to be. this can give an overview how good a certain place is connected to the outside world.

notes

-the distance to the stop is not accurate, but is measured as the distance to the next stop. different routes may take part from different stops, this is not considered for now. therefore the maps are only rough estimations.
-not always all tiles load, i am not sure why, one thing is that routing does not apply, if the goal is very near, e.g. from the 'botanischer garten' to the ruhr-universitaet stop.
-this was coded during the first hackathon at the institute for neural computations, bochum, germany.

usage

for now everything is very rough at the edges. but still i tried to add a usuable command line interface. roughly you need to add the rectangle to search (in latitute/longitude coordinates), the resolution of that by specifying the number of grid points you want, add the date (not that important, it will use next weeks data, which is a reasonable choice) and the hour to consider (hours can make a huge difference, e.g. night time everything will take longer). then you just run the script. it will create a .kml file, which you can now easily open in google earth, or use any other geo program that can overlay kml.

prerequisites for the script: VRR::EFA, Travel::Routing::DE::VRR, Geo::KML::PolyMap just to name some. i had some trouble getting everything run, no guarantee that all these libraries work out well for you. i've added local versions of VRR::EFA and Travel::Routing, that was somehow crucial for me.

There are many options, some are from the Travel::Routing::DE package, some are new. Some of them i do not use at all. Those that can be reasonably used are the following:

	$ ./putrama.pl [options]

	--arrive HH:MM
		arrival time, e.g. 10:00 in the morning to get in time to the morning lectures.
	--colorbins #
		number of bins to threshold the final connection times. Defaults to 32 (if enough tiles are queried).
	--date DD.MM.YYYY
		date when to query the connections. weekdays should be faster than weekends,
		day connections faster than night connections.
	--endcolor AABBGGRR
		color for slow connections, alpha value, blue value, green value, red value in hexadecimal.
	--endlat #
		end latitute of grid.
	--endlong #
		end longitute of grid.
	--gridsizelat #
		how many tiles in latitute direction should be created?
	--gridsizelong #
		how many tiles in longitude direction should be created?
	--kmlfilename filename
		filename for kml output
	--startcolor AABBGGRR
		color for fast connections, alpha value, blue value, green value, red value in hexadecimal.
	--startlat #
		start latitute of grid.
	--startlong=f
		start longitute of grid.
	--to city, stop 
		specify where the connections should go to. 
	--verbosity #
		verbosity level, 0 = few outputs, 100 = all outputs.

The map on this website was created with

$ ./putrama.pl --gridsizelong 64 --gridsizelat 64  --startlat 51.58 --endlat 51.37 --endlong 7.45 --date 6.11.2014 --verbosity 100

example

theme template by Your Inspiration Web