Hi Joe,
I've been adding in some NBA data (e.g., game number, site streak, rest) and have been running into some issues with updating the fields, only for when the t:team is away (i.e., t:site=away).
I have two follow-up questions to your response in this thread:
(1) You might have already answered this above, but just to confirm, is there any way to update only one half/side of a game-- in particular, when the team is away-- without having to include stats for both the home and away teams in the same row/dict? (The stats for the home team seem to update fine when not also including stats for the away team.)
For instance, would it be possible to use the following dict structure to update the stats for the 2021-10-27 / 't:team': 'Timberwolves / 'o:team':'Bucks' game (as highlighted in attached screenshot)? (Note, the Timberwolves was the away team for that game.)
data_dict = {
'date': 20211027,
't:team': 'Timberwolves',
'o:team': 'Bucks',
't:game number': 4,
't:rest': '1',
't:site streak': 3,
'venue name': 'Fiserv Forum',
'venue city': 'Milwaukee',
'venue state': 'WI',
'venue capacity': 17341,
'data datetimestamp': '2021-10-23 01:08:06'
}
If it is not possible to update stats for the away team without also providing stats for the both sides/halves of the game (i.e., stats for both the home and away teams), then this won't be an issue, I am able to reconfigure my data to include both sides, I just wanted to confirm this indeed is the case. (The approach of including stats for both home and away sides in one row already worked for me, when testing on games for earlier in the 2021 season.)
(2) If stats for both sides/halves of a game must be included in order to update the second/opponent side (i.e., "o:" side) of the game, then, can you recommend a good way to clearly know which team is the "t:" side, and which team the "o:" team, in a game/row of the database?
I could make the assumption that the home team will always be the 't:' team/side, and the away team always the 'o:' team/side and this should work most of the time. However, this is not necessarily a good assumption all the time: some games are played at a neutral site, or, I could foresee there being instances when the home='t:' and away='o:' heuristic doesn't happen to be strictly followed (i.e., if the sides are inadvertently switched). For these edge cases, I guess I could always just use trial and error.
If you do have any insight/advice on a best practice for identifying the "t:" side of a game in the database (or if there is a good way to update only one side of a game when the team is away, without having to provide the fields for both sides), I'd appreciate it.
Thanks for all of your great work over the years and support during this transition.
Thanks, and have a good weekend.
--Brian