rogersmark / mls-api Goto Github PK
View Code? Open in Web Editor NEWDjango App for the MLS Soccer Stats API I'm playing with
License: BSD 2-Clause "Simplified" License
Django App for the MLS Soccer Stats API I'm playing with
License: BSD 2-Clause "Simplified" License
Right now they FK to Players instead of GamePlayers, and that's poor. Also need to make use of this model in general, but some mls-scraper work needs to be done first. That work is documented here
We can easily pull all the links to every game from the Results Map (http://www.mlssoccer.com/results). I have a good list of all of those links, but it'd be nice to not be relying on that random file on my laptop forever.
Not much good being just on my machine.
For some reason, after parsing 2013's stats, and then parsing 2012 I'm getting MutlipleObjectsReturned errors for players. Lenhart and Gordon seem to be the biggest trouble makers, which seems oddly fitting.
After the scraper project is properly returning this data, let's pull it in to the database.
Need to convert to a celery stack at some point. Won't be super useful until I get this deployed somewhere though.
Just want to get a thread going for weird/random games that don't parse:
http://www.mlssoccer.com/match/484907/stats - 403. Oddly can't view this in a browser either, looks like a bug on the MLS Soccer side.
http://www.mlssoccer.com/match/484859/stats - Error:
Traceback (most recent call last):
File "/home/mrogers/projects/mls/src/mls-api/mls_api/management/commands/scrape_game.py", line 138, in _parse_game_stats
self.parsed_stats = parser.MLSStatsParser(url, logger=self.logger)
File "/home/mrogers/projects/mls/src/mls-scraper/mls_scraper/parser.py", line 127, in init
self._generate_stats()
File "/home/mrogers/projects/mls/src/mls-scraper/mls_scraper/parser.py", line 32, in _generate_stats
self.get_events()
File "/home/mrogers/projects/mls/src/mls-scraper/mls_scraper/parser.py", line 104, in get_events
self._get_bookings()
File "/home/mrogers/projects/mls/src/mls-scraper/mls_scraper/parser.py", line 471, in _get_bookings
self._parse_booking_dict(x) for x in events
File "/home/mrogers/projects/mls/src/mls-scraper/mls_scraper/parser.py", line 444, in _parse_booking_dict
booking.card_color = booking_dict['card_color']
KeyError: 'card_color'
Would be nice if you could easily parse 2012 stats
Right now when doing processing of a large set of stats, it's hard to tell what's going right/wrong.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.