tcassou / causal_impact

Python package for causal inference using Bayesian structural time-series models.
236 stars 33 forks source link

Feature Request: small multiples option for top row #8

Closed timandrews335 closed 5 years ago

timandrews335 commented 5 years ago

Hi @tcassou. Thanks for taking the time to port causal impact over to Python. One aspect I like is that unlike the R version OOTB, you are plotting all of the time series. It got me thinking that for certain time series where the lines could be on top of each other a lot, an option to plot each time series in a small chart to view the trends side by side. I'd like to submit a pull request of this functionality. See example image here

tcassou commented 5 years ago

Hi @timandrews335 Thanks for proposing this improvement! The one thing with small plots next to each other is that the intervention date is no longer aligned between all graphs, and I'm sure we can figure out a way to cover that as well. I'll take a look and will get back to you! Thomas

timandrews335 commented 5 years ago

@tcassou I think I know what you mean. I updated the code and there is no longer a gap at the end of the small charts and the x-axes are all labeled the same now. I'll close the pull request and open a new one with updated code. See updated image here

tcassou commented 5 years ago

As discussed in #11, 1.2.1 offers a (slightly different) way to allow this behaviour. Thanks for the good suggestion!