iERP-ai / businesswithcovid-generator

Script generating data for the businesswithcorona.com - generatorrrr
http://businesswithcorona.com
0 stars 0 forks source link

Implement business score into country's json #6

Closed flesicek closed 4 years ago

flesicek commented 4 years ago

There are 2 places where business score predictions array will be used.

  1. there is currenty section in country specific json file "scores". Value "iERPScoreBNow" is correctly generated. Add values "iERPScoreBDays7", "iERPScoreBDays14", "iERPScoreBDays21" which will extract value of predicted business score from array for today+7, today+14 and today+21 corespondingly.

  2. In the country specific json, create new section graphs->iERPScoreB->forecast same as in history there will be predictions for next 21 days. Note: In order to have forecast and predictions graphs joined on the UI, last element from history needs to be first element in forecast list. Then second will be forecast for today+1

      "history": [
        {
          "d": "2019-10-03",
          "iERPScoreB": 6
        }
      ],
      "forecast": [
        {
          "d": "2019-10-03",
          "iERPScoreB": 6
        },
        {
          "d": "2019-10-04",
          "iERPScoreB": 4
        },
        {
          "d": "2019-10-05",
          "iERPScoreB": 5
        },
        {
          "d": "2019-10-06",
          "iERPScoreB": 6
        }
      ]