Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Sept 5, 2012 8:03:58 GMT
Looking for bit off assistance here from anyone that may have played with this API. I am having a go at writng my first App ... basically listing the registrations of buses on a route from this api. This is the query I use for say 60 (replace 60 with any route number) countdown.api.tfl.gov.uk/interfaces/ura/instant_V1?LineName=60&ReturnList=RegistrationNumber,LineID Now this returns about 15 times as much data as required - which can be filtered by the app - just wondered if there was a way to structure the api call to return only unique Registration Numbers. Alternatively anyone know a way a chucking SQL queries at this database. This would make App quicker, reduce data transfer and reduce load placed on TfL server
|
|
|
Post by snoggle on Sept 5, 2012 12:33:16 GMT
Looking for bit off assistance here from anyone that may have played with this API. I am having a go at writng my first App ... basically listing the registrations of buses on a route from this api. This is the query I use for say 60 (replace 60 with any route number) countdown.api.tfl.gov.uk/interfaces/ura/instant_V1?LineName=60&ReturnList=RegistrationNumber,LineID Now this returns about 15 times as much data as required - which can be filtered by the app - just wondered if there was a way to structure the api call to return only unique Registration Numbers. Alternatively anyone know a way a chucking SQL queries at this database. This would make App quicker, reduce data transfer and reduce load placed on TfL server I am a long way from really understanding how all this works and I haven't a clue how to write an app. I think the fundamental issue is that the Countdown database holds a 30 minute look ahead from the current position of any single vehicle on a route. With an average of 2-3 mins between stops I think this is why you get 15 responses per vehicle. The other issue to bare in mind is that vehicles "disappear" when vehicles are on the stand if engines are off. It is impossible to take a single snapshot of the total PVR for a day because of vehicles on stands or routes only operating for a short period (off peak bus routes or schools routes). Best of luck in creating your app! Hopefully someone cleverer than me can give you some more insight.
|
|
|
Post by VPL630 on Sept 5, 2012 17:31:59 GMT
Looking for bit off assistance here from anyone that may have played with this API. I am having a go at writng my first App ... basically listing the registrations of buses on a route from this api. This is the query I use for say 60 (replace 60 with any route number) countdown.api.tfl.gov.uk/interfaces/ura/instant_V1?LineName=60&ReturnList=RegistrationNumber,LineID Now this returns about 15 times as much data as required - which can be filtered by the app - just wondered if there was a way to structure the api call to return only unique Registration Numbers. Alternatively anyone know a way a chucking SQL queries at this database. This would make App quicker, reduce data transfer and reduce load placed on TfL server Yes, Sorry getting really Lazy and behind on the stuff I have said I will do 1 Read This, www.tfl.gov.uk/assets/downloads/businessandpartners/tfl-live-bus-arrivals-api-documentation.pdf2 To check the registration for any bus Here is the link countdown.api.tfl.gov.uk/interfaces/ura/instant_V1?RegistrationNumber=YX58HVL&ReturnList=RegistrationNumber,LineID 3 If you want to add any other information like the Time it is due at a stop along with the Stop name and Final Destination, Yes it will give multiple results but that is because it will show data for where the bus is due at stop's in a 30 min window. countdown.api.tfl.gov.uk/interfaces/ura/instant_V1?RegistrationNumber=YX58HVL&ReturnList=RegistrationNumber,LineID,DestinationName,DestinationText,StopPointName,EstimatedTime It shows the time as an absolute time in UTC as per Unix Epoch (in milliseconds). To convert to UTC Epoch divide by 1000 or just use an online calculator Anyone needs any help with anything just reply here and I hope I will be able to help This would make App quicker, reduce data transfer and reduce load placed on TfL server[/quote] Also you should use this link for the route, as sometimes the LineName can be changed and won't show any data countdown.api.tfl.gov.uk/interfaces/ura/instant_V1?LineID=498&ReturnList=RegistrationNumber,LineID Replace 498 with what ever route you want
|
|
|
Post by VPL630 on Sept 6, 2012 14:36:10 GMT
Here is a link to that website thomasc.co.uk/bus/Not finished yet but is quite good, More features on the way
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Sept 6, 2012 23:25:06 GMT
Here is a link to that website thomasc.co.uk/bus/Not finished yet but is quite good, More features on the way Any chance of getting both the running numbers & bus fleet no's?
|
|
|
Post by VPL630 on Sept 7, 2012 6:33:52 GMT
Running Numbers are not shown in the Data from TFL
|
|
|
Post by smiler52 on Sept 7, 2012 15:31:02 GMT
Running Numbers are not shown in the Data from TFL what about getting it to show the next stop thanks
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Sept 7, 2012 15:50:07 GMT
Running Numbers are not shown in the Data from TFL what about getting it to show the next stop thanks If you are going to do that you will need direction as well ... unless you know all the bus stop codes off the top of your head
|
|
|
Post by smiler52 on Sept 7, 2012 16:03:09 GMT
thanks mate
|
|
|
Post by VPL630 on Sept 7, 2012 18:39:01 GMT
Features on the way AFAIK are:
Database to store the data for 14 days Fleet codes to be added and the ability to search using them Where the bus is and what way its going
Should all be added in due time
|
|
|
Post by LX09FBJ on Sept 8, 2012 19:26:15 GMT
Do like playing around and 'remotely' spotting buses, 'spotted' a VW on the 390 last night! Just a few niggles 1) The countdown doesn't seem to show the stops in order of which they serve, which I find annoying 2) If a bus' iBus is switched off then it's registration might not appear.
|
|
|
Post by VPL630 on Sept 8, 2012 21:19:02 GMT
Do like playing around and 'remotely' spotting buses, 'spotted' a VW on the 390 last night! Just a few niggles 1) The countdown doesn't seem to show the stops in order of which they serve, which I find annoying 2) If a bus' iBus is switched off then it's registration might not appear. Go moan at TFL then
|
|
|
Post by snoggle on Sept 9, 2012 21:27:37 GMT
Do like playing around and 'remotely' spotting buses, 'spotted' a VW on the 390 last night! Just a few niggles 1) The countdown doesn't seem to show the stops in order of which they serve, which I find annoying 2) If a bus' iBus is switched off then it's registration might not appear. To be fair the system is designed to help manage bus services and provide the public with limited arrivals information. We should be grateful that the API has been made public and that open access to the data is available. It could so easily have been sealed off and kept completely confidential thus preventing people "spotting" from their armchairs.
|
|
|
Post by VPL630 on Sept 14, 2012 20:55:36 GMT
New version of the application just in time for the weekend.. URL is brianspictures.thomasc.co.uk/lvf/ as I he had not got time to publish it on the other URL... A number of new features.. Extra spaces allowed in input, fuller display of info... minor problem is not all the new vehicles are in the database yet but I'll get that corrected next week Not Made By Me
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Sept 14, 2012 22:08:28 GMT
They should make a map to locate the buses as well.
|
|