Improve the chart that summarizes active games

On the main page in the upper left corner there is a 2-dimensional chart with active games with game speed on the X-axis and game rank on the Y-axis. This chart is very convenient to find interesting games (i.e. with dan players), however since most games have the same timing settings (20m + 5x30s) this chart becomes a short vertical line with lots of dots.

I suggest to add another “mode” to this diagram in which X-axis will be the rank of the W player and the Y-axis will be the rank of the B player (usually they are close). In addition to that the diagram can show in the same way all correspondence games with lightgray dots (there will be a lot of them, so there should be a way to hide them). The timing settings can be represented by color/size of the dots, i.e. red/bold dots for blitz games and lightgray tiny dots for correspondence games.

Assuming the server already sends this data to the web app, it should be fairly easy to implement this with a small JS script. I would be more than happy to write this script in my spare time: you can then review it and add to the site.

1 Like

I love it when people say this :wink:

Go for it!:

http://online-go.com/api/v1/games/?ended__isnull=True

1 Like

I noticed that in most cases usernames are null, i.e. data.results.map(r => r.players).map(p => p.black.username + ’ vs. ’ + p.white.username) gave me

null vs. null
thefalls vs. Eldyn
null vs. null
null vs. null
null vs. null
null vs. null
null vs. null
Hiro7188 vs. whilehere
null vs. null
null vs. null
bd_ vs. StephenM
null vs. null
null vs. null
null vs. null
null vs. null
achew22 vs. ostrich
case vs. Solidus
Hiro7188 vs. vblandy
vblandy vs. jodageezer
null vs. null
null vs. null
null vs. null
null vs. null
null vs. null
null vs. null

Is it a bug?

Another question is how to fetch data in some meaningful order? The response says that there are over 50k active games, so the server returns them in chunks (25 games per response). Is there a way to fetch a slice of all the games based on some criteria, i.e. timing or rank?

The ones with nulls are likely challenges that haven’t been accepted yet… you can also filter on started__isnull=False (for example). You can sort fields with order_by:

&order_by=id for example. For id desc ordering: &order_by=-id

You can also adjust the page size:

&page_size=30 for example… there is a maximum (I believe 50) for page size.