ngrates / espn-fantasy-baseball-data-fetcher

Grabs league information from ESPN's fantasy API and stores the information in Pandas DataFrames
1 stars 0 forks source link

install issue #1

Open wcawcawcawca opened 2 years ago

wcawcawcawca commented 2 years ago

hi!

first off, i found this project via the discussion in the espn-fantasy-api project. i'm unable to use it for my roto league, so was hoping to play around with this and see if it could. i tried installing it just now and got:

image

i'm not terribly skilled with python, so i'm probably doing something wrong. any ideas? fwiw, i'm installing the package in an anaconda environment.

ngrates commented 2 years ago

Hello!

I haven't set up the project to work as a package just yet. I'll look into this tomorrow and get back to you so you can use it :)

Are there any particular features that you are looking for? Right now it's capable of pulling daily stats for the entire season, getting the season long stats, and populating team info. I'd be happy to add features on request or even collaborate with you!

wcawcawcawca commented 2 years ago

hi!

understood! shows you how experienced i am with python...

well, maybe this will help answer your questions. i set out trying to find a way to rebuild the summary pages from the old version of espn's fantasy product.

i'm not sure if you remember them, but they were insightful. one was a single page featuring a table. the table was divided into months, and months were divided into weeks. each row was a week, and it featured a summary of that week's stats. then it did a subtotal for each month. grand totals were at the bottom.

the other was a masterlist of all the players rostered by a team over the year, and it only showed the stats they accumulated for you while they were active--not benched. you could see this for each team. it was incredibly helpful.

there are some incredibly useful numbers in there and espn wantonly got rid of them whenever they instituted the new version.

so recovering those pages was my motivation. and given what little i know of what you're doing, it seems you could pretty much get them.

beyond those, another cool feature might be looking at how a manager does with daily moves? like, how often do they start their ideal team? how different would their stats be if they fielded an optimal team everyday?

could also analyze how strong some people are at drafting versus picking up fa.

but of course, given what little i know of what you're doing, i have no idea how possible these things are. and of course, i don't know how involved you want to get. again, i'm not a python person, so my help would be limited. but i'm willing to chip in and figure things out. i'm a sql db engineer with limited experience with python and even less experience with r. more than happy to try and help, though!

ngrates commented 2 years ago

Hi again and thanks for the well thought out response. I will work on getting this ready to distribute as a package, but in the meantime I added a few items to help get you started.

The first item I added is a requirements.txt file. Here you can find the required package to run this code.

I also added a main.py file that you can use as a guide to use this repository. If you download all of the .py files and place them into the same folder, you will be able to run the main.py file with your own fantasy league information. By default all of the information is returned as excel files, but it's also easy to import it as a database.

The first data output from the main.py file are season hitting tables.

The second data output is the master list of stat lines for every team and every day of the season, which is similar to what you are mentioning. This can then be used to generate many other useful tables, such as the ones you are mentioning. I will work on adding the functions for this.

Some of the other things you mentioned are ideas I have also thought about, and I will work on implementing them in the future.

You can also store the data in a SQL database if you would prefer to access the data that way. If you just let me know what you think the best way to structure it is, I can see if I can make it happen.