PDA

View Full Version : Excel Question- import data


zerosky
11-23-2008, 06:37 AM
I import data from the equibase trackmaster pro software into excel.
The problem is that each day the filename changes by appending the date to the filename, for instance "AQA20081123speed_class.csv"
when I hit the refresh button excel looks for the file with the previous days name.

My work-around at the moment is to rename the file each day by cutting out the date part of the file name.
Is there a way to configure it to find the latest file without having to rename it?

I've tried searching google but not had much luck.

Capper Al
11-23-2008, 07:00 AM
I import data from the equibase trackmaster pro software into excel.
The problem is that each day the filename changes by appending the date to the filename, for instance "AQA20081123speed_class.csv"
when I hit the refresh button excel looks for the file with the previous days name.

My work-around at the moment is to rename the file each day by cutting out the date part of the file name.
Is there a way to configure it to find the latest file without having to rename it?

I've tried searching google but not had much luck.

What's the problem with using the wizard from the menu to import?

zerosky
11-23-2008, 08:12 AM
The 'wizard' is good for setting up the initial conditions, but I don't want to run it every day.
The 'Refresh Data' button goes and fetches the file automatically and updates the spreadsheet with the new file,
except in my case the new file has a new name incorperating the date which outfoxes the refresh proccess which
is looking for the file name generated when it was created.

clear as mud I know :)

HUSKER55
11-23-2008, 11:33 AM
I am no guru..regardless of how you define it. just a thought, most wizards that I am familiar with, have a window that asks where to download the file to. If you type in a name with an extension I would think it would create a new file in the format you asked for which wouldn't change because the link would be broken. :confused: I think. Perhaps not.

If you maintain the link then when the database is upgraded so would be your file in your database. If you are saving files on a daily base I don't see how that could be done without having to rename the file so the link would be broken.

Like I said, I am not a guru. Just a thought. I am probably wrong. just trying to help.

dutchboy
11-23-2008, 03:29 PM
You could post the question on mrexcel.com It is free to use and seems to have a large user base who might know the answer.

I visit the site but have never posted a question so I don't know if you would get a response. They also have a large database of questions and answers. Since importing to excel is something that every business does each day I doubt if you would be the first one to ask the question. I learn quite a bit by just reading other questions and the answers.

raybo
11-24-2008, 12:50 AM
What are you using Excel for? Are you using it as a database of post-handicapped races? Are you using it for further analysis work for daily handicapping? I'm an Excel guy but you've got me confused.:confused:

zerosky
11-24-2008, 03:57 AM
What are you using Excel for? Are you using it as a database of post-handicapped races?
Are you using it for further analysis work for daily handicapping?
I'm an Excel guy but you've got me confused.:confused:

I use it mainly for handicapping I find it much easier to work with than the printed form
as I can concentrate on those factors that work best for me.

As a sidebar I am also in the early stages of building a Logit Model.

raybo
11-24-2008, 05:59 AM
I use it mainly for handicapping I find it much easier to work with than the printed form
as I can concentrate on those factors that work best for me.

As a sidebar I am also in the early stages of building a Logit Model.

Why not just create a macro in Excel to clear the previous data, go get the new data and put it in Excel? This is the way I get my data from Bris via Infotran into my spreadsheet.

zerosky
11-24-2008, 12:35 PM
Why not just create a macro in Excel to clear the previous data, go get the new data and put it in Excel? This is the way I get my data from Bris via Infotran into my spreadsheet.

I can build only very simple macro's this one is beyond my skill level.
Thanks for your help though:ThmbUp:

raybo
11-24-2008, 03:21 PM
I can build only very simple macro's this one is beyond my skill level.
Thanks for your help though:ThmbUp:

You should be able to do a "record macro" for everything you do now except selecting the race file in Trackmaster. If so, why not select the race in Trackmaster first, then go back to Excel, click on the macro button that goes back to Trackmaster and copies the selection ("Selection.Copy"), goes back to Excel and pastes the file wherever you want it to? All that code could be done with a "record macro" which does exactly what you do with your keyboard or mouse.

HUSKER55
11-24-2008, 03:50 PM
What is a logit model and what is the advantage of one. (I was trying to impress a girl that day in class) :D

Thanks

zerosky
11-24-2008, 05:05 PM
What is a logit model and what is the advantage of one. (I was trying to impress a girl that day in class) :D Thanks

It can be used as a two step approach to creating a fair odds-line. The first step takes several variables
such as class pace and speed then computes probabilities for each horse.
The second step is to blend the output of the first step with the tote odds.

http://en.wikipedia.org/wiki/Logistic_regression

http://faculty.vassar.edu/lowry/VassarStats.html

Its been discused on this board several times, personally I don't think it can replace good old fashioned handicapping
but I enjoy the intellectual challange which considering the limits of my intellect is not actually saying alot:)

Capper Al
11-24-2008, 08:12 PM
It can be used as a two step approach to creating a fair odds-line. The first step takes several variables
such as class pace and speed then computes probabilities for each horse.
The second step is to blend the output of the first step with the tote odds.

http://en.wikipedia.org/wiki/Logistic_regression

http://faculty.vassar.edu/lowry/VassarStats.html

Its been discused on this board several times, personally I don't think it can replace good old fashioned handicapping
but I enjoy the intellectual challange which considering the limits of my intellect is not actually saying alot:)

Are you making handicapping too complicated?

HUSKER55
11-25-2008, 12:45 AM
Hey guys, I went to wikipedia and I did not understand their so called simple example. It is fairly certain that I will not be going down that road.


Out of idle curiosity can you explain how you assign probability (or odds) to class or speed ratings in terms I can follow without using logit?

Capper Al
11-25-2008, 07:39 AM
Hey guys, I went to wikipedia and I did not understand their so called simple example. It is fairly certain that I will not be going down that road.


Out of idle curiosity can you explain how you assign probability (or odds) to class or speed ratings in terms I can follow without using logit?
First work on picking winners. Then categorize your race types such as Allowance+Dirt+Sprint. Next keep records on your attributes such as class or speed, etc. Then do the math. You'll have your data to work from. You'll know that speed works for you 1 out of 4 times in this category, and you set your odds appropriately.

zerosky
11-25-2008, 07:49 AM
Out of idle curiosity can you explain how you assign probability (or odds) to class or speed ratings in terms I can follow without using logit?

Let us suppose you can assign a class rating to each horse in the field.
First, you standardize and then assign a normal distribution to each rating.
For example these are the average class ratings at surface distance for the field in the Nashua stakes ran at aqueduct.

PRINCE CHARMING (70)
HELLO BROADWAY (103)
TIRE KICKER (30)
ROYAL VINDICATION (100)
FRIESAN FIRE (80)
BREAK WATER EDISON (103)
FORTY THIEVES (105)

The average value is 84 and the Standard deviation is 28 plugging these values back
into the standardize/normal distribution equations results in the following values

PRINCE CHARMING (30%)
HELLO BROADWAY (75%)
TIRE KICKER (2%)
ROYAL VINDICATION (71%)
FRIESAN FIRE (44%)
BREAK WATER EDISON (75%)
FORTY THIEVES (77%)


This is where the logistic regression comes in, by sampling a number of races using the above procedure;
you can work out the coefficients with which to multiply these values with. In my model, you end up with these figures.


PRINCE CHARMING (-0.54)
HELLO BROADWAY (0.31)
TIRE KICKER (-1.07)
ROYAL VINDICATION (0.24)
FRIESAN FIRE (-0.29)
BREAK WATER EDISON (0.31)
FORTY THIEVES (0.35)


Which represent the log of the odds ratio (P/Q) the same procedure is followed for each variable you wish to consider
and then the output of each variable is added together, which results in a final set of log odds.


At this point, if you are still conscious the Logit model is used to take these values and produce probabilities
for each entry from which the odds line is produced for step one.

PRINCE CHARMING (100/1)
HELLO BROADWAY (3/1)
TIRE KICKER (80/1)
ROYAL VINDICATION (4/1)
FRIESAN FIRE (15/2)
BREAK WATER EDISON (6/1)
FORTY THIEVES (3/1)

HUSKER55
11-25-2008, 08:32 AM
Thanks guys. I really appreciate you taking the time to answer my questions.

Thank you.

husker55

:)