dynastyprocess / data

An open-data fantasy football repository, maintained by DynastyProcess.com
https://dynastyprocess.com
GNU General Public License v3.0
73 stars 19 forks source link

Key between database.csv and value<X>.csv files. #4

Closed trojanguard25 closed 4 years ago

trojanguard25 commented 4 years ago

Recently, the structure of the various value.csv files changed. It used to be the case that they had a "mergename" column that matched the same column in database.csv. However, it is now just "player", and the name used doesn't match the mergename from database.csv or the joined first_name + last_name columns.

I had been using the data in database.csv to link the player values to the mfl_ids. If there is an alternative way to do that, please let me know.

tanho63 commented 4 years ago

Hey Dan, thank you for reaching out! Wasn't ever really quite sure how many people were hitting the CSVs directly. I have a few other restructures planned - are you looking primarily to connect the values-*.csvs to MFL etc?

tanho63 commented 4 years ago

Assuming that's the goal, I believe you want to join the values-players (or values-total) to db_playerids.csv on fp_id = fantasypros_id, then use the corresponding MFL ID. The database.csv itself was getting a bit unwieldy, so the plan is to separate that into more manageable tables.

trojanguard25 commented 4 years ago

Leaving out a lot of the details, I've been using this project as quasi-glue for my own (primitive) pipeline. I'm connecting my MFL leagues to your player values, but I'm also using the database.csv to connect GSIS_ID (like used in the nflscrapR data) to MFL_ID.

trojanguard25 commented 4 years ago

Just saw your latest commit. The new db_playerids.csv file looks extremely useful. I'll switch to use that. And thanks for adding the column to the values.csv files.

tanho63 commented 4 years ago

Awesome, glad to be helpful!

tanho63 commented 4 years ago

I'd try to hit the db_playerids.csv by name - the naming there will be stable, but more columns may be added as I come across stuff!