London Transport (uk.transport.london) Discussion of all forms of transport in London.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old May 11th 09, 05:41 PM posted to uk.transport.london
external usenet poster
 
First recorded activity at LondonBanter: Aug 2006
Posts: 112
Default Journey history with a Bank problem?

On Fri, 8 May 2009 02:09:39 -0700 (PDT),
wrote:


Certainly, my first reaction was that there must have been some
expensive unresolved journeys, but it appears not. But I needed to do
some spreadsheet work to be sure.


I've also suffered missing entries, but with a correct overall
balance. Am I alone in thinking that the online display is
unnecessarily confusing? The "Fare" column doesn't actually show the
fare for a journey (except for a bus) - it shows debits and credits.
I'm interested in your spreadsheet - does anyone have anything that
you can just paste the journey history into and it actually shows the
fares charged??

(Sorry this is rather specific to unix and open office users but maybe
someone can adapt it for microsoft tools)

I use the following:

1. Save the "printer friendly version" of the journey history.

2. Run it through a script to turn the saved html in 1 into a csv file
(see end of this post for the script)

3. Import the CSV into open office.

Then (I think) adding the following columns will give you what you want:

Column I: row 94: =IF(A95+B95+2/24A94+B94;I95+E94;E94)
Column J: row 94: =IF(A95+B95+2/24A94+B94;"";I94)

Copy and paste into the other rows.

This fails in two cases: 1, if you have auto top-up that will be added
to your journey "cost" and 2, if you make two journeys the second of
which starts less than two hours after the first finished it will be
consolidated into one journey.

1 is fairly easy to fix - just create a new column that zeros out any
auto top-up entries and then change the column I formula to reference
your new column instead of column E. 2 is harder to fix - you can tweak
the 2/24 parameter - that's the number of hours for the next entry to be
added to your journey (not the total journey time)

I don't know how well this will play with capping - I've never reached a
cap - or season tickets plus extensions.

Tim.


$ cat ppv2csv
cat $1 |
sed -n '
/tr/ {
h
}
/\/tr/ {
H
x
//g s/
s/\n//g
s/\t//g
s/ *//g
s/ *//g
s/tr//g
s|/tr||g
s/td//g
s|/td|$ $|g
s/^.*$//
s/[^]*//g
s/£//g
s/- /-/g
p
}
{
H
}
' |
while read d r; do
if [[ "$d" = '$' ]]; then
d=$oldd;
else
oldd=$d
fi
echo $d $r
done |
grep -v '^$' |
sed 's/\$ \$/\t/g'

--
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t,"
and there was light.

http://www.woodall.me.uk/
  #2   Report Post  
Old May 14th 09, 02:32 PM posted to uk.transport.london
Tim Tim is offline
external usenet poster
 
First recorded activity at LondonBanter: May 2009
Posts: 1
Default Journey history with a Bank problem?

Thanks muchly for your efforts on this, but I don't think it's going
to help as it's mostly gobbledygook to me!!! I just wish the online
journey history wasn't so complicated to make sense of (let alone
reflect the journey history accurately, which was the origin of this
thread!).
Regards
Tim

On 11 May, 18:41, Tim Woodall wrote:
On Fri, 8 May 2009 02:09:39 -0700 (PDT),
* * wrote:

Certainly, my first reaction was that there must have been some
expensive unresolved journeys, but it appears not. But I needed to do
some spreadsheet work to be sure.


I've also suffered missing entries, but with a correct overall
balance. Am I alone in thinking that the online display is
unnecessarily confusing? The "Fare" column doesn't actually show the
fare for a journey (except for a bus) - it shows debits and credits.
I'm interested in your spreadsheet - does anyone have anything that
you can just paste the journey history into and it actually shows the
fares charged??


(Sorry this is rather specific to unix and open office users but maybe
someone can adapt it for microsoft tools)

I use the following:

1. Save the "printer friendly version" of the journey history.

2. Run it through a script to turn the saved html in 1 into a csv file
(see end of this post for the script)

3. Import the CSV into open office.

Then (I think) adding the following columns will give you what you want:

Column I: row 94: =IF(A95+B95+2/24A94+B94;I95+E94;E94)
Column J: row 94: =IF(A95+B95+2/24A94+B94;"";I94)

Copy and paste into the other rows.

This fails in two cases: 1, if you have auto top-up that will be added
to your journey "cost" and 2, if you make two journeys the second of
which starts less than two hours after the first finished it will be
consolidated into one journey.

1 is fairly easy to fix - just create a new column that zeros out any
auto top-up entries and then change the column I formula to reference
your new column instead of column E. 2 is harder to fix - you can tweak
the 2/24 parameter - that's the number of hours for the next entry to be
added to your journey (not the total journey time)

I don't know how well this will play with capping - I've never reached a
cap - or season tickets plus extensions.

Tim.

$ cat ppv2csv
cat $1 |
sed -n '
/tr/ {
* * * * * h
* * * * }
/\/tr/ {
* * * * * H
* * * * * x
//g * * * s/
* * * * * s/\n//g
* * * * * s/\t//g
* * * * * s/ *//g
* * * * * s/ *//g
* * * * * s/tr//g
* * * * * s|/tr||g
* * * * * s/td//g
* * * * * s|/td|$ $|g
* * * * * s/^.*$//
* * * * * s/[^]*//g
* * * * * s/£//g
* * * * * s/- /-/g
* * * * * p
* * * * }
{
* * * * H
* * * * }
' |
while read d r; do
* if [[ "$d" = '$' ]]; then
* * d=$oldd;
* else
* * oldd=$d
* fi
* echo $d $r
done |
grep -v '^$' |
sed 's/\$ \$/\t/g'

--
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t,"
and there was light.

*http://www.woodall.me.uk/


  #3   Report Post  
Old May 17th 09, 06:36 PM posted to uk.transport.london
external usenet poster
 
First recorded activity at LondonBanter: Aug 2006
Posts: 112
Default Journey history with a Bank problem?

On Thu, 14 May 2009 07:32:00 -0700 (PDT),
Tim wrote:
Thanks muchly for your efforts on this, but I don't think it's going
to help as it's mostly gobbledygook to me!!! I just wish the online
journey history wasn't so complicated to make sense of (let alone
reflect the journey history accurately, which was the origin of this
thread!).
Regards


I've found it's very much easier than that :-)

You can import the "printer ready" version of the journey history
straight into openoffice.

I've build a spreadsheet where all you need to do is:
1. Save the printer ready journey history to a file
2. Insert-Sheet From File and select the file created in 1
3. Change Cell B1 on the "Journeys" sheet to the name of the sheet you
created in 2.

That's it. Enjoy your journey history.

http://www.woodall.me.uk/journeycalc/journeycalc.ods

http://www.openoffice.org/

(Note that I'm using version 2.4 of openoffice. I assume later versions
will open this file without any problems)

I've included two sheets of my journey history just so you can see how
it works, including what happens when there are missing items in the
journey history.

The sheet "Workings" is used for internal calculations, just ignore it
unless you want to enhance the way it calculates the start and end of
journeys. At the moment the logic is that if a row happens more than two
hours after the previous row then it's a journey start, otherwise it's
a journey continuation.

(For anyone who wants to improve this, the two critical columns are H
and I on this page. As long as these are right, everything else should
automatically be correct - bugs excepted)

Openoffice does have the option to save as an excel file but as I have
not way to test this I've not done it.

Note also that I have a very boring life on oyster. I've got no capped
journeys, no cash top-ups etc. These may not work properly. If anyone
wants to provide printer ready journey histories with these in I'll try
and enhance the spreadsheet to handle them properly

Tim.

p.s. I've protected the two critical sheets (other than cell B1 on
Journeys.) There's no password set to this can just be turned off if you
want to change things.

--
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t,"
and there was light.

http://www.woodall.me.uk/
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Oyster Journey History - can anyone explain this? sweek London Transport 21 February 15th 07 02:34 PM
Oyster Journey History - can anyone explain this? sweek London Transport 0 February 12th 07 08:29 PM
oyster journey history no more Larry Lard London Transport 2 September 12th 06 01:53 PM
Journey History Now On TFL Website News_Demon London Transport 6 July 10th 06 10:11 AM
My Epping and Ongar railway History website will be have a reopening next wednesday FULL HISTORY"! EorJames London Transport 6 August 15th 05 07:51 PM


All times are GMT. The time now is 01:40 PM.

Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 London Banter.
The comments are property of their posters.
 

About Us

"It's about London Transport"

 

Copyright © 2017