Priesemann-Group / covid19_inference

Bayesian python toolbox for inference and forecast of the spread of the Coronavirus
GNU General Public License v3.0
73 stars 70 forks source link

JHU-data has different format #30

Closed Konrad982 closed 4 years ago

Konrad982 commented 4 years ago

The data retrieved using the JHU class by e.g. get_confirmed is differently formatted. If it is converted to a numpy array, it is [[2], [4],...] instead of [2,4,...], i.e. apparently an array of arrays.

Konrad982 commented 4 years ago

I try to solve this myself

Konrad982 commented 4 years ago

A quickfix to get a usable numpy array is to use .to_numpy().T[0] or .to_numpy().flatten(), e.g. total_cases = JHU.get_confirmed(country="France",begin_date=bd,end_date=ed).to_numpy().T[0]

I did not find the cause for the difference to the RKI method however. I stumbled on this when modifying the one bundesland script to use JHU data for France.