Slowgeek » Forums » General
 
FAQ   •     •   Login  •   Challenge Search:

Weather Data - some suggestions

(10 posts)

  1. ATJ777

    senior member
    Joined: Sep '09
    Posts: 90

    Oh No! ATJ777 is going to be a pain again...

    Here are some suggestions for the weather data associated with runs.

    On the RU page, if I choose unit=km can I have temperatures in Celsius instead of Fahrenheit? I name my runs in the description field and then sort by that field so I can compare runs on the same course. It would be very handy to gave temperature data that is meaningful to me as perhaps one explanation for running slower.

    Can the temperature data be rounded rather than truncated? i.e. <.5 rounds down, >=.5 rounds up. e.g. 21.5 would become 22. The temperature was 20.9ºC at the start of my last run (this morning), but it shows in the graph as 20ºC.

    It appears that the temperature shown with the run is the temperature at the start of the run. Two runs a week I run in the morning and the temperature can increase over the course of the run. I'm wondering if it might be better to either show the maximum temperature during the run or even the average temperature. For my run this morning, it was 20.9ºC at the start of the run but 25.5ºC at the end of the run. I think I've had runs where there was an even larger jump in the temperature.

    Posted 6 months ago #      

  2. rlerdorf

    senior admin
    Joined: Nov '08
    Posts: 236

    The first 2 requests have been implemented. The average temp during the run is a bit harder. The granularity of most weather stations don't really give me enough leeway to do that. Also, I don't actually know what time the run ended because the data doesn't tell me how long any pauses might be. All I know for sure is when the run started. But, I could try to pick out temperatures that are after the start time and before start+duration and try to average that. If you have a 30 minute pause in there I have no way of dealing with that.

    Posted 6 months ago #      

  3. rlerdorf

    senior admin
    Joined: Nov '08
    Posts: 236

    Ok, I now do start+duration/2 as the temperature time. That should give a slightly more representative temperature. I have re-calculated the weather for all your runs based on this. Let me know if it looks correct now.

    Posted 6 months ago #      

  4. ATJ777

    senior member
    Joined: Sep '09
    Posts: 90

    Great! Thanks for the quick response.

    I didn't even think about pauses and can see what a trouble they would be. All of my runs will show a pause as that is the only way to stop a workout using the iPod Touch (if you also want to use Clicks as splits). Around 10 metres from the end of my run I hit the iPod button (registered as a click) which brings up the interface on the screen and then I can pause the workout. I can't actually end the workout until I unlock the screen - which may not happen for a few minutes up to hours. What is really annoying with the iPod is frequently the duration associated with the Pause is different from the duration associated with the workout. For example, from my last run, the pause duration is 1405867 but the duration in the run summary is 1406443. It is only a half second different, but there is no logical reason for it as I go directly from Pause to End (even if there is a gap of minutes to hours). Anyway... enough of that.

    If we ignore pauses for the moment, here's how I was thinking the average and/or maximum could be done. We know the start time for the run. We can calculate the end time by adding the duration to the start time. Look up the weather station for all the entries it has between the start time and the end time. Depending on the weather station this may result in only one entry or it could result in 20. (Of course, there may be none, because no entries fall inside the period between start and end, but for those situations I recommend you do whatever you are doing now and forget about average). For average, just add all the entries you got from the weather station for the period and divide by the number of entries. For maximum, just take the biggest one.

    Maybe you could add a profile option for temperate and users could choose Start, Average or Maximum. Those that do pauses in the middle of their runs might be better off with Start.

    Now to my data.... For my most recent run it is showing 26.2ºC. The run started at 8:20 and the duration was 23:26. i.e. end time was 8:43:26. The available weather data is as follows:
    08:17 20.8 °C
    08:22 20.9 °C
    08:27 21.4 °C
    08:32 22.6 °C
    08:37 23.7 °C
    08:43 25.5 °C
    08:50 25.9 °C
    I would have thought start+duration/2 would be 8:32 which would give me 22.6ºC. So something isn't right.

    Using the method I just proposed, the average would be (20.9+21.4+22.6+23.7+25.5)/5 = 22.8ºC. In this case, either method would work well.

    Posted 6 months ago #      

  5. rlerdorf

    senior admin
    Joined: Nov '08
    Posts: 236

    Yeah, looking through the code, it needs a bit more work. Did it during commercials of the Olympics last night. It needs a good 45-minutes of solid attention to clean up.

    Posted 6 months ago #      

  6. ATJ777

    senior member
    Joined: Sep '09
    Posts: 90

    Oh... I forgot to mention another idea I had, which might be cool, although I don't know how hard it would be (and obviously ignoring pauses).

    How neat would it be if the graph of the run also included temperature? For example, for my run above, you could show points on the graph for each of the temperatures recorded by the weather station at the appropriate point during the run. i.e. 20.9 at where I was at 8:22, 21.4 at 8:27, etc.

    This is exactly what my dive watch does for dives. It records the depth every 5 seconds and the temperature every 5 minutes and plots both on a graph. Here are some examples:
    http://atj.net.au/Dive20101310Shiprock.jpg
    http://atj.net.au/Dive20101820Halfway_Point.jpg
    http://atj.net.au/Dive201013111Little_Bay.jpg
    http://atj.net.au/Dive201021219Bare_Island.jpg

    Posted 6 months ago #      

  7. rlerdorf

    senior admin
    Joined: Nov '08
    Posts: 236

    I did consider that, but the majority of the weather stations don't really give enough data to make that worthwhile. I'll take another look though.

    Posted 6 months ago #      

  8. ATJ777

    senior member
    Joined: Sep '09
    Posts: 90

    My numbers looks good now. Thanks.

    Posted 6 months ago #      

  9. Building429

    member
    Joined: Nov '08
    Posts: 15

    rlerdorf,
    How do you find the weather for a certain time in a location? Is there a website that lets you enter a time and a place and it returns the temperature? Thanks

    Posted 6 months ago #      

  10. rlerdorf

    senior admin
    Joined: Nov '08
    Posts: 236

    There is no clean API out there for historical weather data, but a little-known hack is that you can append &format=l to the end of the weather history URLs at wunderground.com, but the format isn't consistent, neither is the data, so you have to do a lot of fiddling.

    Posted 6 months ago #      

Reply

You must log in to post.

RSS feed for this topic