Badges with statistics

I would like to have a badge that shows to current pv-power (which is easy to achieve) but also a comparison to the same time of day the day before.

Is that possible?

Best regards,

Stefan