Member-only story

PHP portfolio piece — Analytics data.

Josh Otwell
4 min readJan 20, 2021

--

I recently published a blog post about a portfolio project I am developing using the LAMP stack, Bootstrap 4, jQuery, and the MVC (Model-View-Controller) design pattern in core PHP. In this post, I will introduce an additional feature I integrated into the existing project.

Image by xresch from Pixabay

Self-Promotion:

If you enjoy the content written here, by all means, share this blog and your favorite post(s) with others who may benefit from or like it as well. Since coffee is my favorite drink, you can even buy me one if you would like!

I keep tabs on walking data via a pedometer mobile application for the many walks I take as I work towards better health and manageable weight. Analytics are vital in understanding patterns in your data. Utilizing MySQL VIEW‘s along with the Aggregate functions SUM() and AVG(), I broke down the analytic data into these broad categories:

  • The shoe worn (Totally irrelevant. I just happen to have purchased, worn, and tried a lot of different hiking shoes/boots)
  • The day of the week (E.g., Monday, Tuesday, etc…)
  • The month
  • The year

I further subdivided the categories — with the exception of ‘yearly’ data — into 2 similar sub-groups: sums and averages. I added in an Analytics button between the Export

--

--

Josh Otwell
Josh Otwell

Written by Josh Otwell

SQL/PHP | Photography | Technical Consultant. Sign-up for my free developer newsletter, OpenLampTech, here: openlamptech.substack.com

No responses yet