Giter Club home page Giter Club logo

Comments (5)

robotallie avatar robotallie commented on June 19, 2024 1

This really helps!
The date was March 8, 2005, I believe.
Thanks!

Here's the error:
File "http://gd2.mlb.com/components/game/mlb/year_2005/month_03/day_08/scoreboard.xml", line 1
XMLSyntaxError: Document is empty, line 1, column 1

from mlbgame.

panzarino avatar panzarino commented on June 19, 2024 1

I am not sure if that is currently an option. Currently, the injury function just gets current injury data. I will look into seeing if there is a way to get historical injury data for certain games or certain points in time.

from mlbgame.

panzarino avatar panzarino commented on June 19, 2024

Do you have the exact date for the URL error? If you can provide me with that data, I should be able to look into it and see that the error is.

Documentation for the injury object can be located here: http://panz.io/mlbgame/info.m.html#mlbgame.info.Injury
This documentation contains all of the object properties for injuries.

Here is a small example of getting injury data:

import mlbgame

for injury in mlbgame.injury().injuries:
    print(injury.name_first + " " +
    injury.name_last + " (" +
    injury.position + ") (" +
    injury.team_name + ") " +
    injury.injury_desc)

And the output:

Alex Meyer (P) (Angels) Recovering from Sept. 2017 right shoulder surgery
Brady Rodgers (P) (Astros) Recovering from May 2017 Tommy John surgery
Jandel Gustave (P) (Astros) Recovering from June 2017 Tommy John surgery
Jimmy Nelson (P) (Brewers) Recovering from Sept. 2017 right shoulder surgery
Alex Reyes (P) (Cardinals) Recovering from February 2017 Tommy John surgery
Ildemaro Vargas (2B) (D-backs) Recovering from Oct. 2017 right hand surgery
Chris Owings (SS) (D-backs) Fractured right middle finger
Shelby Miller (P) (D-backs) Recovering from May 2017 Tommy John surgery
Grant Dayton (P) (Dodgers) Recovering from August 2017 Tommy John surgery
Will Smith (P) (Giants) Recovering from March 2017 Tommy John surgery
Brandon Guyer (RF) (Indians) Left wrist soreness
Michael Brantley (LF) (Indians) Recovering from October 2017 right ankle surgery
Cody Anderson (P) (Indians) Recovering from March 2017 Tommy John surgery
Drew Smyly (P) (Mariners) Recovery from July 2017 Tommy John surgery
Edinson Volquez (P) (Marlins) Recovering from August 2017 Tommy John surgery
David Wright (3B) (Mets) Recovering from September 2017 shoulder surgery
T.J. Rivera (3B) (Mets) Recovering from September 2017 Tommy John surgery
Michael Conforto (LF) (Mets) Recovering from September 2017 shoulder surgery
Joe Ross (P) (Nationals) Recovering from July 2017 Tommy John surgery
Daniel Murphy (2B) (Nationals) Recovering from October 2017 right knee surgery
Carter Capps (P) (Padres) Recovering from Sept. 2017 surgery
Chi Chi Gonzalez (P) (Rangers) Recovering from July 2017 Tommy John surgery
Eduardo Rodriguez (P) (Red Sox) Recovering from October 2017 right knee surgery
Dustin Pedroia (2B) (Red Sox) Recovering from October 2017 left knee surgery
Rookie Davis (P) (Reds) Recovering from October 2017 right hip surgery
Nate Karns (P) (Royals) Recovering from July 2017 rib surgery
Trevor May (P) (Twins) Recovering from March 2017 Tommy John surgery
Carlos Rodon (P) (White Sox) Recovering from Sept. 2017 left shoulder surgery
Zach Putnam (P) (White Sox) Recovering from June 2017 Tommy John surgery
Jake Petricka (P) (White Sox) Recovering from October 2017 right elbow surgery

Hopefully this helps, if you need any more information feel free to let me know.

from mlbgame.

robotallie avatar robotallie commented on June 19, 2024

I want injury data for all teams for 2000, so I requested game data this way:
year_games_2000 = mlbgame.games(2000) games_2000 = mlbgame.combine_games(year_games_2000)

Then, to get corresponding injuries info, where would I insert the game specific id to request injuries for 2005 in the following code snipped:

injury_2000 = mlbgame.injuries().injuries

Thanks!

from mlbgame.

robotallie avatar robotallie commented on June 19, 2024

That would be great. There are a few people that have created Excel sheets on their own with updates from other fans for years 2000 - 2017, but I'm hoping to do a machine learning classification analysis on injuries to predict the likelihood of a player being injured in any game based on other historical stats for that player and that game.

The API is awesome, by the way!

from mlbgame.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.