Comments (5)
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.
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.
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.
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.
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)
- Issue with the `overview` endpoint HOT 2
- Calling `box_score` gives you an error if it's the top of an inning for a live game HOT 1
- Building an updating scoreboard for a day's games HOT 2
- `AtBat`'s attributes `des`, `event`, 'des_es`, and `event_es` are occasionally empty HOT 1
- Changing time zone to Pacific HOT 1
- overview(game_id) causes XMLSyntaxError HOT 2
- long return time waits? HOT 2
- Events run very slow HOT 1
- Pypi version (2.5) out of date HOT 1
- Standings pulls
- Can I get data such as if there are runners on first, second, or third, and how many balls and strikes there are? HOT 1
- game_id HOT 3
- Probable Pitchers HOT 3
- Game ID HOT 1
- Home/Away probables listed for wrong team
- mlbgame.injury() gives AttributeError HOT 4
- get_raw_box_score throws 'Could not find a game with that id.' exception for valid game_id
- Getting game events for game with unplayed bottom of final inning causes IndexError
- ValueError: Could not find a game with that id still occurring -- worked yesterday HOT 1
- 2022 Games not appearing HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mlbgame.