Jump to content

API has different return values with statistics center


Recommended Posts

I just found that the Rating Times API(https://api.vatsim.net/api/ratings/{id}/rating_times/) and the statistics center (https://stats.vatsim.net/) have different return values.

For example, the Controller time is 3667:59 while the API returns the atc time 3546.72, so I'm wondering is the rating time api have some latency on updating times?

api_datainconformity.thumb.jpeg.6d8976afc06d7c8f5fcadfd23ee635e6.jpeg

Qiushi "Alan" Jin

VATSIM P. R. China Division Assistant Webmaster (VATPRC8A)

VATSIM Online Pilot (P1), VATPRC En-route Controller (C1)

&style=for-the-badge&suffix=h

spacer.png

Link to post
Share on other sites

There's currently an issue where the appropriate hours are not being correctly attributed. The stats website gathers this data in a different way, which is why there is a discrepancy. 

I've raised this issue with the appropriate folks, I will post an update in the API changelog thread when it has been resolved. If you follow the thread, you will receive an e-mail notification.

Ryan Bentley
Senior Web Developer
## [email protected]
## www.vatsim.net
## ##
Logo
Link to post
Share on other sites
1 hour ago, Ryan Bentley said:

There's currently an issue where the appropriate hours are not being correctly attributed. The stats website gathers this data in a different way, which is why there is a discrepancy. 

I've raised this issue with the appropriate folks, I will post an update in the API changelog thread when it has been resolved. If you follow the thread, you will receive an e-mail notification.

😄Got it! Thanks again for the new APIs, really help us a lot for our web services 

Qiushi "Alan" Jin

VATSIM P. R. China Division Assistant Webmaster (VATPRC8A)

VATSIM Online Pilot (P1), VATPRC En-route Controller (C1)

&style=for-the-badge&suffix=h

spacer.png

Link to post
Share on other sites

I have implemented the API for rating_times and found that the hrs logged are not same, having some slightly difference, though the hrs logged as SUP are showing of the ATC section only, instead of Total hrs logged as SUP, screenshot attached.

hrs difference.png

Raihan Shahzad
Division Director VATWA1
VATSIM West Asia
vatwa.net | director[at]vatwa.net

Link to post
Share on other sites
8 hours ago, Ryan Bentley said:

Yep, if you read the discussion above, we are already aware of the issue.

Hi Ryan, thank you for your reply, yes i have been through the above posts, however i posted the screenshot as to look into the SUP hrs too which i circled in the screenshot.

Will be waiting for an update, thanks

Raihan Shahzad
Division Director VATWA1
VATSIM West Asia
vatwa.net | director[at]vatwa.net

Link to post
Share on other sites
14 hours ago, Ryan Bentley said:

This issue has now been resolved.

Hi Ryan,

It seems I still get the wrong data after the update today, is that not deployed to the server now?

Cheers, Alan

image.thumb.png.56582b9d9c7e3414ed22af32dce9f111.png

 

Qiushi "Alan" Jin

VATSIM P. R. China Division Assistant Webmaster (VATPRC8A)

VATSIM Online Pilot (P1), VATPRC En-route Controller (C1)

&style=for-the-badge&suffix=h

spacer.png

Link to post
Share on other sites
3 hours ago, Ryan Bentley said:

 

Hi, can you give it another shot now? 

Unfortunately the number returned by the API is still not correct as the stats.vatsim.net... In the stats website, his ATC time is 585+ hours, which is apparently not matching what has been returned.

screenshot.jpg.ad3a6f88efd1b6fd68d38d29540f8987.jpg

 

 

Wenlue Zhang | Contact me

Senior Controller (C3)
P.R.China Division Webmaster (VATPRC8) 

spacer.png

Link to post
Share on other sites
26 minutes ago, Nick Harasym said:

Hey there!

This issue has been resolved either way. Legacy code was using poor calculations. The new method is more accurate. If any major discrepancies are found we will review them.

Hi Nick,

Not sure if this API is using the new method to calculate time, but I found the API seems tend to delay calculating the time. We have just found an example for this by chance just yesterday.  The user applied for ATC training so we tried to see if the pilot has met the requirement of online flying hours. When we compare the time from this API and the stats website, we noticed the API returned 5h and the stats returned 51h. We almost rejected the application if we were not use the stats website for a double check.

Then, we tried to dig down into the statistics. We found the pilot gained 6h in 2017, 45h on the past 2 months. What the API returned is exactly what the pilot previously gained in 2017. By this observation, I guess the API here failed/delayed to count the time that a user recently gained. 

If there is another API using the new method you mentioned, is it possible to integrate it into this API here? Thanks in advance.

api.thumb.jpg.9a2a86d4e0ae9b133c74afe73e5cfb58.jpgstats.jpg.6f7c0cb02a9bcab79aa2f1458fa5f200.jpg 

Edited by Wenlue Zhang

Wenlue Zhang | Contact me

Senior Controller (C3)
P.R.China Division Webmaster (VATPRC8) 

spacer.png

Link to post
Share on other sites
2 minutes ago, Nick Harasym said:

Hey there,

This user looks to have been missed in the last run of the CIDs. I've ran this one and the hours now reflect properly. 

Hi

Thanks for your reply:) I found that the user Wenlue just mentioned has correct hours now, but some user (including me, 1356779) still got the controller's hour months ago (In fact, if you check my atc hours, you can find I got correct S2 and S3 hours but incorrect C1 hours because I haven't login as S2/S3 anymore). Is that possible to run the script to correct everyone's hour? thx

Alan

Qiushi "Alan" Jin

VATSIM P. R. China Division Assistant Webmaster (VATPRC8A)

VATSIM Online Pilot (P1), VATPRC En-route Controller (C1)

&style=for-the-badge&suffix=h

spacer.png

Link to post
Share on other sites
13 minutes ago, Nick Harasym said:

Hey there,

This user looks to have been missed in the last run of the CIDs. I've ran this one and the hours now reflect properly. 

My data has not been updated as well... I gained 96h of flying and 20h of controlling time in the last two months and they didn't get added. Seems many users have been missed in the run.

Wenlue Zhang | Contact me

Senior Controller (C3)
P.R.China Division Webmaster (VATPRC8) 

spacer.png

Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...