0
620hun
6y

Data scientists: I have logged how busy my gym was for a week (every minute). How would I generate a graph of a typical day? I haven’t done anything like this, so I don’t know how to approach the problem. Basically I want to see what time of the day there’s a quiet period on average.

Comments
  • 0
    (By typical I mean average)
  • 1
    What you want is the histogram of people count/hour. There's plenty of libraries to help you out, e.g. python's matplotlib.
  • 2
    Calculate an average for each hour (or other time period) and plot them using some library. Consider also calculating median value instead.
  • 3
    Search your gym on Google and look at the graph it gives you showing busy hours 😁 👌🏼
  • 0
    @mrrmc

    1, Google only knows about Google users
    2, Google only knows how many people are in the sports centre, but I only care about the gym area

    The sports centre does provide current figures, but I have to do the trend analysis myself.
  • 0
    Ugly, but works
  • 2
    Thanks for the input :)
  • 3
    Before I learned Matplotlib, etc., I used to make bar plots using _'s. Like this:
  • 1
    @fizzbuzzCoder that’s very much naive and primitive, good work anyway
  • 1
    @buitrung Yes. I was so naive. Now I do this thing like this.
  • 1
    @fizzbuzzCoder libs are for our utilization, no doubt the result is nice and clean. But doing something retro like your work (which reminds me of htop, mpd, etc) is a proof of a classic progammer! 😁
Add Comment