Detect thunderstorms with datapacks

So, I am trying to detect if there an active thunderstorm in the world and also when it ends, but I haven't found any good solution to this.

Continue to help post