Open audas opened 3 years ago
Thanks @audas. Great idea! And this is definitely how to go about making changes! Much appreciated :smile:
Perhaps we can add a 'metadata' attribute to the Player object which contains these data fields. For example, see Stuart Magee:
player.metadata = {"height": 174,
"weight": 74,
"born": <timestamp_object: "13-Oct-1943">,
"debut": <timestamp_object: "01-Oct-1958">,
"last": <timestamp_object: "01-Oct-1968">,
}
@audas would you like to implement this patch? You've already written most of the HTML parsing, now just need to plug it into the Player.get_player_stats()
function. I'd be happy to help out if you're unsure about how to contribute!
On immediate second thought - perhaps it's better to make that data available as a Pandas dataframe, like all the other data... @audas what do you think?
I added what you have done yes. It comes back in the form of player_bio as part of the object. I also added a new function called get_player_bio() which returns ONLY this so it can be used as a faster function.
I have placed all of Carlton so far into a local database for faster cross reference..
Sounds great @audas. Would you be able to push your update to Github?
I am not confident on doing this sort of thing RamParameswaran - I can post my code, but I feel very uncertain on doing things like this. I would like to learn and try.
I download things as a zip file and work on them in Eclipse or InteliJ etc.
That's 100% okay @audas! pyAFL is a fun hobby project, and a really good way learn about Open Source :wink:
Here's a great video that explains the basics of using Github and contributing to open source projects.
@RamParameswaran Hey, is this still up for grabs? I'd like to try working on it.
Hi @AntonySJohn yep this is still up for grabs. I'd be happy to help or advise if you need, just ping me.
Hi @RamParameswaran, is this still up for grabs? I would like to give it a try.
Hi @adrperez5. Yep no-one else has picked this up, so it is definitely up for grabs! I'm happy for you to implement this as you think best. And I'll of course review and merge your PR promptly. Thanks!
Hi @audas I have placed the bio information in the Player object as an attribute so it may be called using player.metadata after calling get_player_stats. player.metadata is currently a dictionary. This is my first time contributing, so I would like some guidance on how to have my code reviewed.
Not really sure how to go about making changes - but it would be great if we could get player stats to include player bio so we can have their date of birth etc. If we get it as a timestamp then we can also use it as useable data, same for height and weight. Something like this? Sorry if this is not the way of going about things.
`