Hey,
Would you mind to share the code? Would really appreciate it!
Parse your log files. If condition met, insert a line into your database.
Add extra details with a reverse DNS lookup, and IP location check.
I'm using: https://www.geoplugin.com/ at the moment, but feel like there are probably better alternatives.
I then move the data to another log file with a similar name and date so it doesn't get parsed twice, but I keep the data.
Then just make a page to pull the data out of the database.
This is probably what you are looking for:
https://developers.google.com/chart/interactive/docs/gallery
Just do a loop and feed the values into the chart data.