djay / covidthailand

Thailand Covid testing and case data gathered and combined from various sources for others to download or view
126 stars 15 forks source link

Vaccination by Province Data has Jumps in it #78

Closed reduxionist closed 2 years ago

reduxionist commented 2 years ago

As seen here in graphs five through eight: Top/Lowest Provinces for Vaccination 2nd/1st Dose.

djay commented 2 years ago

This is caused by the gaps in the vac reports. moph_dashboard_prov.csv

 2021-10-05,Bangkok,7849816.0,4368228.0,424041.0

vaccinations.csv

2021-10-05,Bangkok,7773625.0,4222751.0,370824.0,

seems that the Vac Given 1 Cum etc in the vac reports is calculated so this could be the wrong number?

They are combined here with dash given preference. # Top 5 vaccine rollouts

djay commented 2 years ago

This is caused by glitchy data in the dashboard

dash_prov['Vac Given 1 Cum']['2021-10-07']['Bangkok']
7884808.0
dash_prov['Vac Given 1 Cum']['2021-10-08']['Bangkok']
35123854.0

The MA spreads the glitch over 7 days. But it's not clear how it gets this wrong given the right value is on the dashboard and should be overwritten

Top 5 Provinces     Bangkok      Phuket   Chonburi  Chachoengsao  Samut Sakhon  Rest of Thailand
Date                                                                                            
2021-10-01       101.519903  236.265121  31.047088     30.732674     87.005950        106.987636
2021-10-02       101.573623  237.399376  31.126106     30.787816     87.041725        107.278589
2021-10-03       101.596859  237.489773  31.154090     30.790614     87.069317        107.420918
2021-10-04       101.779022  238.105569  31.628689     31.238945     87.140658        108.136331
2021-10-05       101.956586  238.877871  32.064024     31.759467     87.403886        109.018859
2021-10-06       102.154322  239.671356  32.478260     32.182359     87.513835        109.183309
2021-10-07       102.411077  240.318746  32.883364     32.360572     88.270261        110.618477
2021-10-08       456.202827   91.149303  25.967097     30.870264    138.842406         54.081422
2021-10-09       101.926336   79.610069  70.591984     70.382693     65.996620         39.802916
2021-10-10       102.383944   79.833779  71.171193     70.644287     67.351262         40.216118
2021-10-11       103.590125   81.331997  73.640203     71.288946     69.862049         41.240729
2021-10-12       103.961983   81.557533  74.270886     71.540949     70.256104         41.863443
2021-10-13       104.229921   81.558446  74.630181     71.616603     70.465406         42.452827
2021-10-14       104.544812   81.576343  75.576156     72.270320     70.937517         43.088210
2021-10-15       104.861975   81.668383  76.337674     73.145539     71.523458         43.787938
2021-10-16       105.098962   81.669296  76.586352     73.196685     71.886039         44.094760
2021-10-17       105.293372   81.669296  76.655555     73.259686     71.995883         44.291009
2021-10-18       105.782490   82.048416  77.069596     74.040869     72.524857         44.871349
2021-10-19       106.187494   82.104298  77.558944     74.308323     73.085409         45.483657
2021-10-20       106.533466   82.291667  78.224643     74.644771     73.575040         46.033623
2021-10-21       106.795611   82.856694  78.637805     74.766511     73.728318         46.620459
djay commented 2 years ago

fixed in https://github.com/djay/covidthailand/pull/147 specifically in https://github.com/djay/covidthailand/pull/147/commits/f0f4b836c30ba4c258830f3756a4955f9d252e82