a pythonic query language
Sign in or create a new account.
Open Source Tools Access to Data

PyQL Databases

  Ubuntu is the operating system and philosophy. NginX is the http server. Facebook's Tornado serves as the web framework and holds the PyQL databases in RAM. The Python Programming Language is happily used throughout.

Members are invited to create their own doman specific query language and you only need to enter your e-mail and password in the upper right to create an account. We use cookies to keep you logged in and you can log out using the log out link in the upper right.

  Within my writings this work stands by itself. I have given humankind the greatest gift that has ever been given it. It is also the profoundest, born out of the innermost abundance of truth, an inexhaustible well into which no bucket descends without coming up filled with gold and goodness. For, 'it is the shortest query which brings the storm, thoughts that come on doves feet guide the world'.
--from RJ Hollingdale's translation of Neitzsche in Ecce Homo.

 This web site is about the shortest line between a database and visual data exploration. That is, we will keep the database and the graphic tool kits behind the scenes and focus on agile data access.

The ‘shortest line’ part suggests domain specific query languages connecting databases to visualization tools. A general query language, like SQL, knows little of the user’s intent and is thereby rendered verbose. Domain specific query languages exploit expert knowledge to craft efficient access to data.

The query syntax of the Pythonic Query Language (and descendant Domain Specific Query Languages) is:

fields @ conditions
  fields is a field or a comma delimited list of fields. Like this: date, points, assists, rebounds.
 conditions is a condition or an ` and ` delimited list of conditions. Like this: name = Lebron James and minutes > 30.

An example of valid PyQL from an NBA database of player performance is:
 date, points, assists, rebounds @ name=Lebron James and minutes>30

Both fields and conditions are made up of terms.
A term is a valid Python expression in a name space made up of:
 database parameters;   In the NFL database passes, rushes, and first downs are parameters.
 any imported python modules;    math.log(r/n) is used in a Barely Rational example.
 PyQL Aggregators;   Average passes for each team is: Average(passes)@team.
 other domain specific terms.   Such as joins, constants, and Python methods.

The Pythonic Query Language is a Data Visualization Aware Query Language.

  learn more

As Einstein always said, learning is not by example; learning ist example.
Please explore the databases to the right.

  The Campaign Finance Database gives financio-politco transactions filed with the Oregon Secretary of State since 2001.

The Barely Rational Database gives the number of symbols it takes to represent the 'decimal' expansion of 1/n for the first 1000 counting numbers in bases 2 through 100.

The OECD Health Database gives health care statistics for 34 countries in the Organization for Economic Cooperation and Development.

The FantasyData Database gives information on NFL player performance.

The Sports Data Query Language is a domain specific query language built on top of PyQL. The SDQL is tuned to sports data and gives facile access to common self joins, season-to-date averages, and many other handy customizations.