Julia Community 🟣

Interdisciplinary Physics Team
Interdisciplinary Physics Team

Posted on

[ANN] UnrollingAverages.jl: A Package to Deconvolve Time Series Data

We're happy to announce UnrollingAverages.jl: a package aimed at deconvolving (or unrolling) moving averages of time series to get the original ones back.

In the following, by "original series" or "series" we are going to mean the time series we would like to reconstruct from its "moving average".

The package exports a single function called unrollthat, with a few simple arguments, is able to handle all the following scenarios.

Scenario 1

The initial values of the moving average provided are known.

In this scenario, the original series can be exactly reconstructed.

Scenario 2

The initial values of the moving average provided are not known, but it is known that the series is exclusively composed of natural numbers;

In this scenario, all possible natural series that correspond to the input moving average are returned.

Scenario 3

The initial values of the moving average provided are not known, and it is not true or known that the series is exclusively composed of natural numbers.

In this scenario, the original series cannot be reconstructed in general, so a pseudo-inverse approximation is returned.

Examples

A real-world custom application of this package can be found in the COVID-19 integrated surveillance data repository we maintain.

The output data has been stored here and contain the following information:

  • Reconstructed daily time series of confirmed cases by date of diagnosis stratified by sex and age at the regional level;

lazio-confirmed

  • Reconstructed daily time series of symptomatic cases by date of symptoms onset stratified by sex and age at the regional level;

lazio-symptomatic

  • Reconstructed daily time series of ordinary hospital admissions by date of admission stratified by sex and age at the regional level;

lazio-hospitalized

  • Reconstructed daily time series of intensive hospital admissions by date of admission stratified by sex and age at the regional level;

lazio-icu

  • Reconstructed daily time series of deceased cases by date of death stratified by sex and age at the regional level.

lazio-deceased

For more details, please consider taking a look at the documentation.

Discussions, issues and PRs are always welcome!

References

Contacts

Author GitHub Twitter
Pietro Monticone @pitmonticone @PietroMonticone
Claudio Moroni @ClaudMor @Claudio__Moroni

Top comments (1)

Collapse
 
gabrielfallen profile image
Alexander Chichigin

Is this even legal?! πŸ˜ƒ
Very cool work, congrats!