Jump to content


30day stats in WOTB


  • Please log in to reply
4 replies to this topic

AnnihilationRavager #1 Posted 03 October 2020 - 06:54 PM

    Private

  • Player
  • 623 battles
  • 1
  • Member since:
    11-15-2018
I want to develop an application to view World Of Tanks: Blitz player statistics. I was wondering how to retrieve the statistics from only the last 30 days, instead of whole career. I could not find anything about 30 day stats in the WOTB API documentation.

OniichanSenpai #2 Posted 03 October 2020 - 08:56 PM

    Warrant Officer

  • Player
  • 8696 battles
  • 554
  • [322] 322
  • Member since:
    03-11-2020

Why would an API offer that? You have to create snapshots yourself to simulate this, this is also how all other sites do this.

 

Prepare some lager DB and store snapshots every x days. wot-life does that daily but it might exceed your API call limit.



Lokyyn #3 Posted 30 November 2020 - 09:12 PM

    Private

  • Player
  • 16049 battles
  • 2
  • [METOO] METOO
  • Member since:
    05-11-2012

View PostOniichanSenpai, on 03 October 2020 - 08:56 PM, said:

Why would an API offer that? You have to create snapshots yourself to simulate this, this is also how all other sites do this.

 

Prepare some lager DB and store snapshots every x days. wot-life does that daily but it might exceed your API call limit.

I want to build an application for myself that also gets data from the API for e.g. the last day/week/month. My question is: Isn't the data that you can get via the API only average values? Even if I am doing a daily snapshot Im not able to get daily values from that average values, aren't I?

I'd would be nice if you can help me with that question.



SimIsMalding #4 Posted 25 January 2021 - 04:43 PM

    Lance-corporal

  • Player
  • 14593 battles
  • 63
  • [TR4SH] TR4SH
  • Member since:
    10-26-2012
This might be a little late but it is how it is.
 

View PostLokyyn, on 30 November 2020 - 09:12 PM, said:

I want to build an application for myself that also gets data from the API for e.g. the last day/week/month. My question is: Isn't the data that you can get via the API only average values? Even if I am doing a daily snapshot Im not able to get daily values from that average values, aren't I?

I'd would be nice if you can help me with that question.

 

If my Math does not fail me you actually can get daily stats from the difference of averages.
Example:

Player X has 100 battles. 50 wins & 50 losses. His avg, dmg. is 1000 and an avg tier of 8.0 so on.
The Next day you call again and you see he has 110 Battles 58 wins, 52 losses, his avgdmg is 1090.9 and his avg tier is 8.18.

You can now calculate "session stats" between these two points with some simple Math.

Battles is simply NewBattles - OldBalltles | 110 - 100 = 10
Wins and losses is the same.
The avg dmg is (NewBattles * NewAvgDmg - OldBattles * OldAvgDmg) / (NewBattles - OldBattles) | (110 * 1090.9 - 100 * 1000) / ( 110 - 100) = (120000 - 100000) / 10 = 20000 / 10 = 2000 dpg
The avg tier is the same (NewBattles * NewAvgTier - OldBattles * OldAvgTier) / (NewBattles - OldBattles) | (110 * 8.18 - 100 * 8) / (110 - 100) = (900 - 800) / 10 = 10 avgTier

I hope this clears it up a bit for you.
If anything is unclear or wrong just ask/tell me about it.

Simon



Lokyyn #5 Posted 03 February 2021 - 08:22 PM

    Private

  • Player
  • 16049 battles
  • 2
  • [METOO] METOO
  • Member since:
    05-11-2012

View Postsim51, on 25 January 2021 - 04:43 PM, said:

This might be a little late but it is how it is.
 

 

If my Math does not fail me you actually can get daily stats from the difference of averages.
Example:

Player X has 100 battles. 50 wins & 50 losses. His avg, dmg. is 1000 and an avg tier of 8.0 so on.
The Next day you call again and you see he has 110 Battles 58 wins, 52 losses, his avgdmg is 1090.9 and his avg tier is 8.18.

You can now calculate "session stats" between these two points with some simple Math.

Battles is simply NewBattles - OldBalltles | 110 - 100 = 10
Wins and losses is the same.
The avg dmg is (NewBattles * NewAvgDmg - OldBattles * OldAvgDmg) / (NewBattles - OldBattles) | (110 * 1090.9 - 100 * 1000) / ( 110 - 100) = (120000 - 100000) / 10 = 20000 / 10 = 2000 dpg
The avg tier is the same (NewBattles * NewAvgTier - OldBattles * OldAvgTier) / (NewBattles - OldBattles) | (110 * 8.18 - 100 * 8) / (110 - 100) = (900 - 800) / 10 = 10 avgTier

I hope this clears it up a bit for you.
If anything is unclear or wrong just ask/tell me about it.

Simon

 

First of all thanks for the reply Simon. I didn't think of that possibility and I actually found a API method that returns cumulative statistics for each vehicle. So therefor I am able to manually create snapshots to calculate these "sessions". Your example calculation really helped me, thanks for that.

Even though your answer was late I really appreciated your helpful answer.

 

Have a nice day :)

 






1 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users