Python student project - data analysis

Thank you thank you. I’m so glad that you, thr author of the gotstats website is here to help. I was just wondering if there is no mention of any kind with regard to the ordering parameters and such, how did you find those, by looking into the source code of ogs? You mentioned?

Also I understand that annul can happen if mods annul the game afterwards, even tho the game has ended normally. However I did a query of 2700+ game from a player’s record and the analyze shows that there is no annulled: true, cancellation: false relationship. It means after the game was annulled, the outcome will be changed to cancellation no matter the original status. It’s an overwriting. At least that’s how I interpreted.

P.s. I also do architectural visualization myself but using unreal and 3dsmax. I found unity lacking the visual appealing but no doubt unity is good for programming and coding. That’s off topic.

Thank you so much.

https://online-go.com/api/v1/players/308797/games?page_size=100&annulled=true&outcome=Timeout

also

61 games anulled, 15 outcome=Cancelation

1 Like

My bad… there was 5 annul+timeout in the 2700 I retrieved… most are annul+cancelation.

I should have used the API directly rather than running analysis in a big downloaded file using python.

Thank you again. You have been most helpful.

There’s nothing wrong with running it with python.
You could have counted all combinations in a single run and output the 4 numbers side by side.

Yes. I wasn’t careful with the generalization.

I actually meant cancellation is a subset of annulled. Meaning all outcome:cancellation is associated with annulled:true. But annulled:true can include other outcome, such as timeout. So not vice versa and they are not linked - otherwise there is no point of having both.

It is good we can either do the query on server side or generate a big, all-inclusive game record and do the analysis on Python side. I found the server is actually very fast, given it is mentioned that the entire ogs front end is also using the same API.

Ah, no. The parameters are just standardized ones from I think Django Rest Framework?

For /games endpoint, you can basically choose the DB query you want from the parameters.

  • Things like ordering, or __isnull I don’t know if it’s generated by Django since I don’t use it. But they’re the name of DB query functions in Django so you can guess what they do from name. It’s faster to just open pages and inspect the network tab to get the query urls instead of checking full source code. But if something’s not clean source code does help.
  • As for the values themselves, they’re just the DB columns in a game’s table. You can see what public columns the game table have by opening a game detail page and check the result json. e.g. call Game Detail – Django REST framework. You see there’s an ended field, hence you can ordering=ended

Agreed Unity sucks big time in visualization. I just don’t have the time to learn Unreal also. There’s still so many things I want to learn: modeling, shaders, clip making etc :sweat_smile:

Unity is also faster to learn for programmer, and it’s currently my choice for making mobile app. Ironically this game engine is leagues better than any other specialized mobile app framework out there.

1 Like

Thank you so much both @Chinitsu and @flovo

I can now do so much with query+python. Like export all game records of any player, and then analyze the stats similar to what are on gotstats; I can also download all sgf of any player, put them into sorted folders like “2023-10” “2023-09”, and accept userinput to just download any specific month. For all those query I can save the records in json first and process them locally to make it faster than pulling off the website realtime. Hugely inspired by Gotstats website.

I did look into the the uber download py file but I believe I made a better version for downloading sgfs - I wrote from scratch cuz I didn’t like the logic in uber download. Much faster in comparison and also accept userinput and sort by year-month.

It’s all fun although there is not much practical use at this moment:) Wish can make some thing useful after learning all these.

Thank you thank you thank you.

1 Like