micb25 / dka

Statistische Analyse und Visualisierung der täglichen Diagnoseschlüssel der deutschen COVID-19 Tracing-App (Corona-Warn-App).
https://micb25.github.io/dka/
GNU General Public License v3.0
91 stars 5 forks source link

Add parameter visualization for the parameters that are used to calculate the risk level #6

Open pozoo opened 4 years ago

pozoo commented 4 years ago

The corona warn app risk level calculation is parameterized by the RKI, the app downloads this parameters regularly. They are 5 or 6 parameters that define what signal strength and duration of exposures is considered a risk. All are transmitted using protobufs. I would be nice if this parametrization could be plotted as well and be able to see how this correlates with uploaded diagnosis keys over time. I was planning to do this myself, but did not get to it up to now. Maybe you are interested in doing it.

micb25 commented 4 years ago

In this commit, I have added a first implementation of a Python script to parse the app config files.

It seems that the current config (2020-07-18) recognizes all exposures with a contact time >=10 min. Furthermore, the weights for the different BT signal strengths are all the same. This doesn't make sense to me, however, I have to have a deeper look into the calculation of the final risk score.

Edit: I have found a description how the risk score is being calculated.

exposureConfig {
  transmission {
    appDefined_1: LOWEST
    appDefined_2: LOW
    appDefined_3: LOW_MEDIUM
    appDefined_4: MEDIUM
    appDefined_5: MEDIUM_HIGH
    appDefined_6: HIGH
    appDefined_7: VERY_HIGH
    appDefined_8: HIGHEST
  }
  transmissionWeight: 50.0
  duration {
    gt_10_le_15_min: LOWEST
    gt_15_le_20_min: LOWEST
    gt_20_le_25_min: LOWEST
    gt_25_le_30_min: LOWEST
    gt_30_min: LOWEST
  }
  durationWeight: 50.0
  daysSinceLastExposure {
    ge_14_days: MEDIUM_HIGH
    ge_12_lt_14_days: MEDIUM_HIGH
    ge_10_lt_12_days: MEDIUM_HIGH
    ge_8_lt_10_days: MEDIUM_HIGH
    ge_6_lt_8_days: MEDIUM_HIGH
    ge_4_lt_6_days: MEDIUM_HIGH
    ge_2_lt_4_days: MEDIUM_HIGH
    ge_0_lt_2_days: MEDIUM_HIGH
  }
  daysWeight: 20.0
  attenuation {
    gt_63_le_73_dbm: LOWEST
    gt_51_le_63_dbm: LOWEST
    gt_33_le_51_dbm: LOWEST
    gt_27_le_33_dbm: LOWEST
    gt_15_le_27_dbm: LOWEST
    gt_10_le_15_dbm: LOWEST
    le_10_dbm: LOWEST
  }
  attenuationWeight: 50.0
}
attenuationDuration {
  thresholds {
    lower: 55
    upper: 63
  }
  weights {
    low: 1.0
    mid: 0.5
  }
  riskScoreNormalizationDivisor: 25
}