Showing posts with label data. Show all posts
Showing posts with label data. Show all posts

Sunday, October 21, 2012

My First Triathlon (in 11 years)

A couple of months ago I talked a friend through her first triathlon. Yesterday (Saturday), was my turn.

1/3 mile swim. 10 mile bike. 3.1 mile run.

It was my first race in 11 years, to the day. On October 20th, 2001, I competed in the Great Floridian, an ultra-distance (i.e. ironman) triathlon, 2.4 mile swim, 112 mile ride followed by a 26.2 (marathon) mile run. I quit at about mile 20 or 21, it was 10:30 PM, 15+ hours after starting the day. The biggest reason I quit was because it was a loop run, we ran around a lake three or four times. After the second time around and coming up towards the finish line (for everyone else), I was applauded and cheered for...but I had two more laps. I simply couldn't take it anymore. The smaller reasons were; I didn't really train that year and I didn't feel like losing my mind that evening. Results for that race are here.

Anyway, I competed and completed my first race in over 11 years. I entered as a Clydesdale, a polite way of saying "fat guy" division. Results can be found here. I finished 7th in the group and 307th (top 56%) overall. I'll sum it up though.

Swim, 1/3 mile, 12:27, 3rd out of 20 (Clydesdale Group). Considering this is the second time I've swam in many, many years, I'm happy. I didn't have to tread water at all. I'm really glad I got in that great swim in San Francisco.

Transition 1, 4:02, 10th out of 20. I took my sweet ass time. I was tired. I was also able to finally get my glasses on, so I could see again. Sucks being blind.

Bike, 10 miles, 34:37, 12th out of 20. Overall, I'm pleased. I did this on a mountain bike (15.91 17.33 mph) while (most) everyone else had road/tri bikes. Looking at the times in my group alone, I probably would have been at or near the top. Winning time was 27:30 (in the group).

Transition 2, 2:18, 14th out of 20. Meh, I've never been good at transitions. I didn't care much about this one anyway. I was just there to finish the race.

Run, 3.1 miles, 27:55, 3rd out of 20. That's a 9 min/mile pace. Caught my tri-buddy (John Thompson) within the first quarter mile. Left him and was feeling mighty chatty. So I ran and talked with some other guy further up. When I realized that I was still talking, I told him I shouldn't be talking because my heart would explode and left him. I might have finished a minute or two faster had I not been so chatty. Who knows? I managed to actually run the entire thing too, no stopping for me. I can't remember the last time I ran 3.1 miles in a row.

Now, I can lose about 19 lbs and still compete in the Clydesdale division and possibly place. Get a "real" bike and I can take off about 7 or 8 minutes. Stop lolly-gagging in transition and I can shave off another minute or two. Get down to 7 minutes/mile on the run and that's another 6 minutes. Now the fun begins.

Lest you think I'm getting all cocky...I did this race in 1:21:07. I've done this same distance in well under an hour before. I think my best time was just under 54 minutes. I'm one or two years older and just one or two pounds heavier now...I don't expect to be there again. It'll certainly be fun (and healthy!) trying though.

Wednesday, June 8, 2011

Data Mining + Sailing = Awesome

Jean-Pierre Djicks posted an article yesterday on Big Data: Achieve the Impossible in Real-Time. I actually had a sneak peek at it a couple of weeks ago at the BI Forum...one of the reasons I voted his session as my favorite.

He started out with this slide, as he does in his blog post:



He then went on to talk about how the BMW ORACLE racing team used these metrics to increase performance.

Those gains were incremental and data driven, and they accumulated over years—until the USA could sail at three times the wind speed

source

Another great line from that article:

'The crew of the USA was the best group of sailors in the world, but they were used to working with sails,' says Burns, 'Then we put them under a wing. Our chief designer, Mike Drummond, told them an airline pilot doesn’t look out the window when he’s flying the plane; he looks at his instruments, and you guys have to do the same thing.'

In other words, use the Force Luke. Or not. Whatever.

Take a look at both articles when you get a chance, well worth your time.

Thursday, January 27, 2011

Google Refine

I can't remember exactly where I found this, probably Twitter.

From the website:
Google Refine is a power tool for working with messy data, cleaning it up, transforming it from one format into another, extending it with web services, and linking it to databases like Freebase.

I installed it this afternoon and played around with it a little bit. I was hoping to use it more for analysis, but I just didn't understand what it was built for.

Basically, it allows you to clean up sets of data. You know, you get an excel file from a customer and you want to make sure all instances of State match. Usually, you get a few different variations of it.

- FL
- Fl
- Florida
- FLORIDA
- florida
- FLOR.

I am sure I could go on and on. But you can select all those values and then update them with a single value. Yes, I know you could update those values in a single SQL statement. Perhaps you don't have time to create the table and load the data. This is a simple tool to allow you to do some basic data cleansing.

Check out the video to get a better example of how to use it. Cool stuff.



Wednesday, June 11, 2008

SQL for Buying a New Car

Two weeks ago I purchased a new car. The main reason behind that was that I drove a 1996 Nissan P.O.S. (not point of sale either). I now had a 30+ mile commute each way and I needed a reliable car. A big factor was gas mileage. Two brands stood out, Honda and Toyota. Honda has the Civic Hybrid and Toyota has the Prius (even though I don't care much for the design). The Corolla and Civic were the top two cars. So after visiting those two dealers to look at cars, I stopped by the Mazda dealer to see if they had anything with MPG greater than 30. I drove the Mazda3 and it was nice (everything would be nice compared to my POS). Salesman offered to run the numbers and I said OK. The point of this rambling, is that I want to know what it will cost based on mileage. Of course I didn't have my laptop, so I couldn't run the numbers (and I hadn't previously). I did it in Excel, but wanted to try it out in SQL. Here's the result:
COLUMN ppg FORMAT $999.00
COLUMN car_1_gpy FORMAT 99,999
COLUMN car_2_gpy FORMAT 99,999
COLUMN car_1_cpy FORMAT $999,999.00
COLUMN car_2_cpy FORMAT $999,999.00
COLUMN car_1_cpm FORMAT 999.00
COLUMN car_2_cpm FORMAT 999.00

SELECT
  car_1,
  car_2,
  ppg,
  mpy,
  ROUND( ( mpy / car_1 ) ) car_1_gpy,
  ROUND( ( mpy / car_2 ) ) car_2_gpy,
  ROUND( ( ( mpy / car_1 ) * ppg ), 2 ) car_1_cpy,
  ROUND( ( ( mpy / car_2 ) * ppg ), 2 ) car_2_cpy,
  ROUND( ( ( mpy / car_1 ) * ppg ) / mpy, 2 ) car_1_cpm,
  ROUND( ( ( mpy / car_2 ) * ppg ) / mpy, 2 ) car_2_cpm
FROM
  (
    SELECT
      rownum car_1,
      LAG( rownum, 5 ) OVER
        ( PARTITION BY NULL
          ORDER BY rownum ) car_2
    FROM dual
      CONNECT BY LEVEL <= 50
  ) car_miles,
  (
    SELECT
      3.99 ppg,
      15000 mpy
    FROM dual
  ) constants
/

     CAR_1      CAR_2 CAR_1_GPY CAR_2_GPY    CAR_1_CPY    CAR_2_CPY CAR_1_CPM CAR_2_CPM
---------- ---------- --------- --------- ------------ ------------ --------- ---------
         1               15,000             $59,850.00                   3.99
         2                7,500             $29,925.00                   2.00
         3                5,000             $19,950.00                   1.33
         4                3,750             $14,962.50                   1.00
         5                3,000             $11,970.00                    .80
         6          1     2,500    15,000    $9,975.00   $59,850.00       .67      3.99
         7          2     2,143     7,500    $8,550.00   $29,925.00       .57      2.00
         8          3     1,875     5,000    $7,481.25   $19,950.00       .50      1.33
         9          4     1,667     3,750    $6,650.00   $14,962.50       .44      1.00
        10          5     1,500     3,000    $5,985.00   $11,970.00       .40       .80
        11          6     1,364     2,500    $5,440.91    $9,975.00       .36       .67
        12          7     1,250     2,143    $4,987.50    $8,550.00       .33       .57
        13          8     1,154     1,875    $4,603.85    $7,481.25       .31       .50
        14          9     1,071     1,667    $4,275.00    $6,650.00       .28       .44
        15         10     1,000     1,500    $3,990.00    $5,985.00       .27       .40
        16         11       938     1,364    $3,740.63    $5,440.91       .25       .36
        17         12       882     1,250    $3,520.59    $4,987.50       .23       .33
        18         13       833     1,154    $3,325.00    $4,603.85       .22       .31
        19         14       789     1,071    $3,150.00    $4,275.00       .21       .28
        20         15       750     1,000    $2,992.50    $3,990.00       .20       .27
        21         16       714       938    $2,850.00    $3,740.63       .19       .25
        22         17       682       882    $2,720.45    $3,520.59       .18       .23
        23         18       652       833    $2,602.17    $3,325.00       .17       .22
        24         19       625       789    $2,493.75    $3,150.00       .17       .21
        25         20       600       750    $2,394.00    $2,992.50       .16       .20
        26         21       577       714    $2,301.92    $2,850.00       .15       .19
        27         22       556       682    $2,216.67    $2,720.45       .15       .18
        28         23       536       652    $2,137.50    $2,602.17       .14       .17
        29         24       517       625    $2,063.79    $2,493.75       .14       .17
        30         25       500       600    $1,995.00    $2,394.00       .13       .16
        31         26       484       577    $1,930.65    $2,301.92       .13       .15
        32         27       469       556    $1,870.31    $2,216.67       .12       .15
        33         28       455       536    $1,813.64    $2,137.50       .12       .14
        34         29       441       517    $1,760.29    $2,063.79       .12       .14
        35         30       429       500    $1,710.00    $1,995.00       .11       .13
        36         31       417       484    $1,662.50    $1,930.65       .11       .13
        37         32       405       469    $1,617.57    $1,870.31       .11       .12
        38         33       395       455    $1,575.00    $1,813.64       .11       .12
        39         34       385       441    $1,534.62    $1,760.29       .10       .12
        40         35       375       429    $1,496.25    $1,710.00       .10       .11
        41         36       366       417    $1,459.76    $1,662.50       .10       .11
        42         37       357       405    $1,425.00    $1,617.57       .09       .11
        43         38       349       395    $1,391.86    $1,575.00       .09       .11
        44         39       341       385    $1,360.23    $1,534.62       .09       .10
        45         40       333       375    $1,330.00    $1,496.25       .09       .10
        46         41       326       366    $1,301.09    $1,459.76       .09       .10
        47         42       319       357    $1,273.40    $1,425.00       .08       .09
        48         43       313       349    $1,246.88    $1,391.86       .08       .09
        49         44       306       341    $1,221.43    $1,360.23       .08       .09
        50         45       300       333    $1,197.00    $1,330.00       .08       .09
Obviously this isn't terribly difficult. You can do lots with the results as well. Three or four years ago I would have created a table and a function to do this. Now I can do it "virtually." I love SQL... *Key: car_1 = miles for car 1 car_2 = miles for car 2 car_1_gpy = gallons per year car 1 car_2_gpy = gallons per year car 2 car_1_cpy = cost per year car 1 (gas) car_2_cpy = cost per year car 2 (gas) car_1_cpm = cost per mile car 1 car_2_cpm = cost per mile car 2

Sunday, April 13, 2008

WellCare Data Breach...

Great...
I haven't spoken with anyone at work about this but I was aware of the event before going on vacation. I did not know any of the particulars, only that it involved Georgia in some way.

I believe everyone works hard to safeguard patient data. The short term drawback is that it will make everyone's life that much more difficult, the long term good will be a better process (I hope).