Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manually updating the DB #27

Closed
TobiasHansen opened this issue Jul 9, 2014 · 9 comments
Closed

Manually updating the DB #27

TobiasHansen opened this issue Jul 9, 2014 · 9 comments

Comments

@TobiasHansen
Copy link

Hi,

First off, great work with this, I am amazed on how great it works :)

I have a a little question. What will happen when I use the auto update script if I have manually updated the DB. Will it overwrite the changes I do?

I am asking since I would like to somehow save data from pre 2009 in my DB, so looking at options to make this happen.

Tobias

@BurntSushi
Copy link
Owner

If you have data from before 2009 that fits with the existing schema, then the best thing to do would be to share it. :-)

But to answer your question... No, nfldb-update should not touch your data. The auto update script works with data in nflgame as ground truth, so it will only modify data connected to it.

More to the point, once a game is finished, it is considered immutable. nfldb-update will never modify games that are finished. If your data is pre-2009, then make sure finished is set in the game table and you should be good to go.

These semantics imply that nfldb-update is, for the most part, idempotent with respect to games that are not being played.

Seriously though, would you be interested in contributing your pre-2009 data? AFAIK, the only way to get a hold of it freely is to parse play descriptions, which looks nearly impossible with respect to the granularity expected by nfldb.

@BurntSushi
Copy link
Owner

@TobiasHansen Ping. I'd be really interested to hear how you came across pre-2009 data. It'd be great if we could collaborate. :-)

@TobiasHansen
Copy link
Author

Sorry for my late reply, I went on a holiday right after I posted that question, so havent been around a computer before now.

I am working on an NFL stats application, where I want to add stats pre 2009, thought I really doubt I will find anything that fits the NFLDB, so I think I will need to make a new one, but not totally decided what to do next.

But if I ever find anything that fits, I will for sure share it here :)

@BurntSushi
Copy link
Owner

@TobiasHansen Ah, neat. What do you have so far? It would be nice to collaborate.

The key, I think, is parsing those play descriptions...

@TobiasHansen
Copy link
Author

Not much tbh.

This is my first attempt on a real application. So I am starting with what seams easiest at the moment, and so far I only have made some code who took the Game Result .csv files from this site: https://www.pro-football-reference.com/, and making an All-Time Team Standings :)

I am however making my application in Java, so not sure if what I do fits into this project?

@BurntSushi
Copy link
Owner

This project is absolutely suitable. The Python is entirely incidental. The main contribution of this project is a database. You can use the database independent of the Python. You can import the database, run nfldb-update whenever you want to ingest new data while also adding your own data from before 2009.

Your main problem is getting data from before 2009. You need play by play data for it to work with nfldb. If you can't get that, then you're right, nfldb is not the right project.

@teamfball
Copy link

@ochawkeye
Copy link
Contributor

As an extension of @teamfball 's question (and so I can research it when not in my phone...)

https://github.com/veltman/nflplays is based on the data gathered on that site and referenced in the comments of the page linked.

@BurntSushi
Copy link
Owner

@teamfball Yes. Although it says "play by play" data, it is not really. It's just play descriptions with a few easy attributes extracted. The challenge is to pull out player events from those descriptions. (For every play, there are zero or more player events.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants