Figure out when, during the day, something usually happens?

I've got a record of every time my 3 month old was fed (and how much) almost since birth. So far feedings have been completely driven by hunger. Now, we'd like to try easing into a schedule.

I'd like to be able to visualize when feedings typically occur during the day. I'm thinking some kind of... scatter plot maybe? Where X is time of day (12:00am-11:59pm) and Y is total ounces? Maybe that's not the best way though. Can anyone help me out?

The data looks like this:

  "_index": "formula",
  "_type": "_doc",
  "_id": "703",
  "_version": 1,
  "_score": null,
  "_source": {
    "Time": "8/30/19 4:49 PM",
    "Amount": "5.6 oz.",
    "Note": "",
    "Timestamp": 1567198140000,
    "Ounces": 5.6
  "fields": {
    "Timestamp": [
  "sort": [

My drawing is a bit childish, but this is what I imagine it looking like... I just have no idea how to create it: image

Also, I guess I should add that I have a script to export, parse, munge, and then load each datapoint into elasticsearch, so if I need to tweak or add something to each datapoint to make this easier, that's not a problem.

If you create a field (either scripted field in kibana) or in your script that imports the data that has the Hour of day as a value, you could then do a Histogram on that field on the X-axis ( with a 1h interval maybe - depends on how much accuracy you would want here).

1 Like

Oh, hey, that's a pretty interesting idea. I never really thought about it from that direction, but I'm sure it will work. Thank you @Marius_Dragomir!

It sounds like an interesting thing to do with Elastic, if you have a blog post or something that you're writing about this, it'd be cool if you could post it here.

Well, I'm not a big fan of broadcasting what I do generally, so I don't have a blog or anything, but here's a picture of my first attempt using your hours idea:

That only shows the past 100 days, and it probably needs a little more resolution, but it's really clear that 5, 8, 12, and 3pm are prime candidates for scheduled feedings. Thank you so much for your help!

1 Like

If you have a trial for premium features available, you could try running this through the Anomaly Detection and Forecasting in Machine Learning. Could get some interesting result.

1 Like

I am just spinning it up in a docker cluster. I will look into that stuff though, thanks :slightly_smiling_face:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.