query  log
a pythonic query language
Sign in or create a new account.
February 10th: received link from FantasyData to download Fantasy.2015.zip.
This unzipped tp several files I will start with these three:
TeamGame.2015.csv, Player.2015.csv, and PlayerGame.2015.csv

TeamGame has headers like:
Season Week Team Opponent HomeOrAway Score OpponentScore TotalScore Stadium PlayingSurface Temperature Humidity WindSpeed OverUnder PointSpread ScoreQuarter1 ScoreQuarter2 ScoreQuarter3 ScoreQuarter4

The design idea of "don't touch it" comes in handy here. I benefit from the constraint of using exactly these as database parameters. The first Domain Specific customization will be to make these accessible in a minimalistic way. `SQ1` can only mean ScoreQuarter1, `WS` WindSpeed. Where there is a conflict with just caps, fill in the lower case letters until a unique parameter is specified: 'PSp' distinguishes 'PointSpread' from 'PlayingSurface.'

On there other hand, I feel compelled to fold the data and not express opponent's score as OScore, rather o:Score. For what is the SDQL without parameter prefixes?

The PlayerGame file has headers like:
PlayerID SeasonType Season GameDate Week Team Opponent HomeOrAway Number Name Position PositionCategory Activated Played Started PassingAttempts PassingCompletions PassingYards PassingCompletionPercentage PassingYardsPerAttempt PassingYardsPerCompletion

Next next Domain Specific customization will be joining the Game and Player tables for easy query access.

The Player data file has headers like:
PlayerID Team Number FirstName LastName Position Status Height Weight BirthDate College Experience FantasyPosition Active PositionCategory Name Age ExperienceString BirthDateString PhotoUrl

The PlayerGame file loaded up EZ. I made a few sample graphics at: http://PyQL.org/Fantasy/query

I will join in these parameters as a dictionary and am especially looking forward to using PhotoUrl as scatter plot markers.

February 15th: Download player head shots using the PhotoUrl field in the Players file. Note: the field name PhotoUrl is one reason I moved away from camel case and decided to allow spaces in parameter names. The images are saved by PlayerID. I made all pure white pixels transparent which worked almost well.

It was exciting to make the first scatter plots with player images. Note: currently the mouseover gives the PlayerID (because it is the key into the ICON dictionary). Name or Name and Team would be better. Consider:
PAt,PYa,Icon(PID,size=20,mouseover='%s %s'%(Name,Team))@PAt>1

Added in Join table from Players_2015.csv. Access a players weight with P.Weight and that makes it a domain specific query language.