Conquer Club

Group Statistics

Discuss developing tools and get details on Conquer Club's API.

Moderator: Tech Team

Forum rules
Please read the Community Guidelines before posting.

Group Statistics

Postby ch0rn on Tue Jul 28, 2015 1:08 pm

Using the CC API I created a webpage that allows you to get some different statistics rather than just w/l. I specifically was interested in keeping track of wins and losses versus a specific group of people. I play some recurring games with a group of friends and wanted to have historical w/l for just our group.

example results: http://xbecuk.com/cc/group/?count=4&p=ch0rn,CrazyIvans,doug710,KingKraus,yomada_zaho,reallybignads,Nimrodeo,gshot7

translation, Game Results for all games in which at least 4 of these players participated in : ch0rn,CrazyIvans,doug710,KingKraus,yomada_zaho,reallybignads,Nimrodeo,gshot7 (API pull is done from the first player in the list)

Search form is here to create your own search criteria.

http://xbecuk.com/cc

You can also just put in 1 person's username and search for a breakdown of just that person.

like this

http://xbecuk.com/cc/group/?count=1&p=ch0rn




This is my first ever try at pulling data out of an API or xml/json, so it's a little rough around the edges, but I hope this is something other people here may enjoy.
User avatar
Major ch0rn
 
Posts: 339
Joined: Fri Apr 09, 2010 8:59 am
Location: USA

Re: Group Statistics

Postby shoop76 on Tue Jul 28, 2015 5:31 pm

This looks awesome, accept for the fact that my username brings back an error message. Maybe too many games played. 1 flaw with the number of players part. 4 player games also count doubles games, so this will not give the results you were trying to achieve. But, again, nice work.
User avatar
Major shoop76
Tournament Commissioner
Tournament Commissioner
 
Posts: 5406
Joined: Tue Mar 18, 2008 9:44 am
510754

Re: Group Statistics

Postby ch0rn on Tue Jul 28, 2015 6:52 pm

The reason it wasn't working was effeminately the 32,000 games in your list. I have applied a temporary fix just to get it working (unfortunately it's slow), but I am going to work on a real fix to make it actually work, and work fast. I am just not sure if it's something on my end, or the large amount of API calls (only pulls 200 games per API call). I am going to do a little bit of bench marking and see where the bottleneck is and see if I can make this more efficient for large game lists such as yours. Smaller ones load up real quick, even up to a few thousand still load very fast.

Tomorrow I will separate out doubles games from the "4 player" games. Easy to do, I just didn't think of it. Thanks

*update . Toggle button to add percentages added by request. Also, team game tallies have been removed from the total player counts at the bottom.
User avatar
Major ch0rn
 
Posts: 339
Joined: Fri Apr 09, 2010 8:59 am
Location: USA

Re: Group Statistics

Postby Lord Arioch on Wed Jul 29, 2015 1:19 pm

Splendid work! Kudos earned!
User avatar
Sergeant 1st Class Lord Arioch
 
Posts: 1308
Joined: Wed Feb 20, 2013 6:43 am
Location: Mostly at work

Re: Group Statistics

Postby nietzsche on Wed Jul 29, 2015 5:17 pm

awesome.

i found some errors though:

the number of games I've played is 10289 (according to my wall) but the stats in your web app says it's 11795..

also, it has me having won 1315 / 1333 of 8-man games.. which I wish it was true.

Other stats seem to be in a correct range, but I haven't checked them to be accurate.

http://xbecuk.com/cc/group/?count=0&p=nietzsche

There's a lot of potential to your app, can we suggest ideas?
el cartoncito mas triste del mundo
User avatar
General nietzsche
 
Posts: 4597
Joined: Sun Feb 11, 2007 1:29 am
Location: Fantasy Cooperstown

Re: Group Statistics

Postby ch0rn on Wed Jul 29, 2015 6:22 pm

Thanks for the info, The counts issues are something related to polymorph games. Unfortunately I have never played poly, so it never came up for me in my personal tests. I will have fixes in place for this in the near future. The issue comes up in my counts because a single player shows up several times in the same game.. throws my counts off.

Of course you can always make suggestions, no harm in making them. But my first priority will be fixing what is here to work perfectly, and to make it more efficient too.

*update . Fixed number count, it was the polymorphic games that were throwing some counts off. I do think the number on you wall might be cached or something. If you go to the game finder, and search for all finished games with you in them, it will now match up with my app. (currently both are 10,337).
User avatar
Major ch0rn
 
Posts: 339
Joined: Fri Apr 09, 2010 8:59 am
Location: USA

Re: Group Statistics

Postby FrenchPupil on Mon Aug 10, 2015 5:25 am

It's awesome :) ... thanks A LOT ... :- :) :) :)

If you are looking forward to the tool development ... in the following direction :

- Trends ...
=> are the last 5,10, games Victory Or Loss ? ...the idea is to see the delevopp of the player ... although it is influenced by the level of opponents ... that's not easy to see*
=> maybe possibility to define 1 or 2 time period ... for the extraction ... *

- Maps => how the win % applies to specifs maps ?



* edited
User avatar
Major FrenchPupil
 
Posts: 250
Joined: Sun Mar 15, 2009 6:32 am

Re: Group Statistics

Postby ch0rn on Mon Aug 10, 2015 12:42 pm

I have actually made a couple of small enhancements to it this past weekend.

Some info on recent games, and games in progress are now added.

Example

http://xbecuk.com/cc/group/?count=4&p=ch0rn,CrazyIvans,KingKraus,yomada_zaho,reallybignads,Nimrodeo,gshot7

This was mainly designed to keep stats for just a group of friends who play regular games together for historical stats. But, since the data is already pulled down at this point, I can start to do more with it.


Features coming. No timeline on these, I am going to be busy, but I do have other enhancements planned.
- Map statistics
- Searchable more specific statistics (for 1 player)
User avatar
Major ch0rn
 
Posts: 339
Joined: Fri Apr 09, 2010 8:59 am
Location: USA

Re: Group Statistics

Postby ch0rn on Thu Sep 03, 2015 12:41 pm

Some new updates and fixes to the app today.

-Session caching added, will only pull the xml file down 1 time per user session.
-Glitch where was not showing correct counts for multiplayer games is fixed.

Map Stats are now added.

Example 1) Overall w/l for every map I have ever played.

http://xbecuk.com/cc/map/?count=1&p=ch0rn

or

Example 2) Overall w/l for every map where at least 4 of these players played together. (based on first person in lists xml data)

http://xbecuk.com/cc/map/?count=4&p=ch0rn,CrazyIvans,KingKraus,yomada_zaho,reallybignads,Nimrodeo,gshot7


Some of this could have been made simpler, but as I stated earlier my initial goal of this was to create historical stats for a group of people. The rest is just icing on the cake for other people who have requested it.
User avatar
Major ch0rn
 
Posts: 339
Joined: Fri Apr 09, 2010 8:59 am
Location: USA

Re: Group Statistics

Postby Silly Knig-it on Wed Sep 16, 2015 5:10 am

When I put in my user name I get the following error message. Thanks for your efforts. I hope my feedback is useful.

Server Error in '/' Application.

Syntax error: Missing operand after 'Knig' operator.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SyntaxErrorException: Syntax error: Missing operand after 'Knig' operator.

Source Error:


Line 665:
Line 666: For xx = 0 To totplayers - 1
Line 667: myDataView.RowFilter = standardfilter & " and " & ARptxt(xx) & " = true and winner like '%" & ARptxt(xx) & "%'"
Line 668: Response.Write("<td>")
Line 669: gameswon(xx) = myDataView.Count

Source File: D:\sites\xbecuk\cc\group\default.aspx Line: 667

Stack Trace:


[SyntaxErrorException: Syntax error: Missing operand after 'Knig' operator.]
System.Data.ExpressionParser.Parse() +6257685
System.Data.DataExpression..ctor(DataTable table, String expression, Type type) +154
System.Data.DataView.set_RowFilter(String value) +188
ASP.cc_group_default_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in D:\sites\xbecuk\cc\group\default.aspx:667
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +115
System.Web.UI.Page.Render(HtmlTextWriter writer) +38
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4240

Version Information: Microsoft .NET Framework Version:2.0.50727.5485; ASP.NET Version:2.0.50727.5491
Image
User avatar
Sergeant 1st Class Silly Knig-it
SoC Training Adviser
 
Posts: 2996
Joined: Sat May 28, 2011 12:21 am
Location: Everett, WA

Re: Group Statistics

Postby Donelladan on Wed Sep 16, 2015 6:46 am

Awesome tool ! Thanks a lot !

Few remark. Would be nice if we could set up stats for particular settings, for example if I want to know my stat in double but only with 4 players or I want to know doubles + trench stat.

Also there seems to be a mistake when I put 2 players.
I made the stat for me and ancessus, and the part "number of players give me this :

Number of Players
(not counting team or polymorphic games)
2 10 / 20 10 / 20
3 0 / 3 1 / 3
4 4 / 12 4 / 12
5 10 / 13 1 / 13
6 4 / 20 8 / 20
7 3 / 9 0 / 9
8 16 / 62 7 / 62
9 0 / 0 0 / 0
10 1 / 9 2 / 9
11 0 / 0 0 / 0
12 or more 1 / 6 0 / 6

But

Game Type
Standard 39 / 109 26 / 109
Terminator 7 / 33 6 / 33
Assassin 3 / 12 1 / 12
Polymorphic 11 / 13 2 / 13
Doubles 434 / 956 434 / 956
Triples 81 / 161 83 / 161
Quadruples 122 / 232 122 / 232

So since we played 161 triples it is not possible we only have 20 games with 6 players for example.
Image
User avatar
Colonel Donelladan
 
Posts: 3508
Joined: Tue Mar 03, 2009 8:48 am
4521739

Re: Group Statistics

Postby ch0rn on Thu Sep 17, 2015 12:42 pm

Number of Players
(not counting team or polymorphic games)

I don't count team games (or poly) in the number of players listing...

I realize that these statistics seem like they might be a little limited, but my original intention was solely to keep some simple stats for my private recurring games I play with my friends.... But .. The data is all there, and I am already pulling it down and caching it, so one of these days when I have a couple hours to kill I will write a search add on that has similar options to the game finder so you can specify specific stats to look for.
User avatar
Major ch0rn
 
Posts: 339
Joined: Fri Apr 09, 2010 8:59 am
Location: USA

Re: Group Statistics

Postby Tviorr on Fri Nov 27, 2015 7:24 pm

I like it a lot.

Quite a lot of information in there already.

If I can make requests/suggestions, I would very much like an add-on to the personal breakdown (1 player analysis).

In the map break down, it would be very nice if you could pull how many players you have beaten in the games youve played (won). Preferably unique players as that will make for a great tool when Im looking for what I have to do to boost my cross-map numbers.
User avatar
Major Tviorr
 
Posts: 479
Joined: Tue Oct 26, 2010 5:19 am
Location: 3 clicks beyond madness.

Re: Group Statistics

Postby narutoserigala on Sun Nov 29, 2015 8:45 am

Nicely done

I wonder if you could improve CC dice stats to capture up to the most recent 25 battles tracking 3 game stages per player, each for the first Rd1-4, then Rd5 -8 and beyond Rd9 (the last stage)?

The current CC stats does not breakdown into the above 3 stages, although it does track the most recent 25 battles.

Cheers,


Naruto
Field Marshal narutoserigala
 
Posts: 147
Joined: Sat Aug 11, 2012 2:11 am
2

Re: Group Statistics

Postby ch0rn on Tue Mar 15, 2016 8:52 am

Sorry, this is not pulling from the dice stats, it's just pulling from info available in the API.
User avatar
Major ch0rn
 
Posts: 339
Joined: Fri Apr 09, 2010 8:59 am
Location: USA


Return to Tools Development

Who is online

Users browsing this forum: No registered users