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

Add MLB scoring summary to Boxscores #306

Closed
roclark opened this issue Dec 24, 2019 · 0 comments · Fixed by #307
Closed

Add MLB scoring summary to Boxscores #306

roclark opened this issue Dec 24, 2019 · 0 comments · Fixed by #307
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@roclark
Copy link
Owner

roclark commented Dec 24, 2019

Is your feature request related to a problem? Please describe.
The MLB Boxscores class should include a property which exposes the games final scoring summary. This will give end-users the ability to see how many points each team scored in every inning.

Describe the solution you'd like
One possible solution would be to create a dictionary with the scoring summary and differentiate between both teams, similar to the following:

scoring_summary = {
    'away': [5, 0, 1, 0, 0, 0, 0, 1, 0],
    'home': [1, 0, 0, 0, 1, 0, 0, 0, 0]
}

In the case of extra innings, additional elements can be added as necessary to the scoring summary.

Describe alternatives you've considered
A couple other options would be to create separate properties for the home and away teams, but the scoring summary is generally presented together and feels like a more logical coupling.

Another option is to extend the dictionary with further granularity similar to the following:

scoring_summary = {
    'away': {
        'first': 1,
        'second': 0,
        'third': 0,
        ...
    },
    'home': {
        'first': 5,
        'second': 0,
        'third': 0,
        ...
    }
}

This method doesn't feel elegant and the verbosity of the keys isn't entirely necessary. Plus, this becomes more difficult to utilize in scripts at the risk of clarity.

@roclark roclark added the enhancement New feature or request label Dec 24, 2019
@roclark roclark added this to the Release 0.5.0 milestone Dec 24, 2019
@roclark roclark self-assigned this Dec 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant