facebookexperimental / Robyn

Robyn is an experimental, AI/ML-powered and open sourced Marketing Mix Modeling (MMM) package from Meta Marketing Science. Our mission is to democratise modeling knowledge, inspire the industry through innovation, reduce human bias in the modeling process & build a strong open source marketing science community.
https://facebookexperimental.github.io/Robyn/
MIT License
1.16k stars 344 forks source link

Robyn one pager: Waterfall plot implementation #1111

Closed sumalreddy17 closed 2 weeks ago

sumalreddy17 commented 2 weeks ago

Note: Plotting is done with 90% accuracy expectation. Once all the 8 plots are generated and merged, a different PR will be raised if needed to take care of accuracy.

Implement Response Decomposition Waterfall Plot Adds waterfall plot visualization to display decomposed response contributions:

Horizontal bars showing percentage contribution of each predictor Value labels aligned right on each bar showing absolute and percentage values Bars sorted by contribution magnitude Clean grid styling with light gray horizontal lines Legend showing positive/negative signs above plot Proper handling of baseline variables aggregation at specified level Built for both standalone and subplot integration

Testing:

Screenshot 2024-11-05 at 4 12 26 PM

Graph plotted by R code

Screenshot 2024-11-06 at 2 53 26 PM

TODO: Fix the label text formatting.