things I do

On Kindertip, or whichever name I'll end up choosing

EDIT: The website is online

I’ve started working on a simple project lately, mostly during last week, when I was visiting Sevilla with my family.

I have a ~2 years old daughter, she goes to a kindergarten that around 8 months ago started using an application to communicate live with parents, Kindertap. On that app the teachers upload information on meals, news, contagious illnesses, and pictures.

On December, us parents were told to download all pictures since on January they would delete all old pictures to reduce their used space, and I thought I could write a simple script that, periodically, would download said pictures and upload them either on my NAS or on my GDrive account, since on the website there is a “Downloads” page where said pictures can be downloaded as monthly compressed files.

This long introduction just to say that this app uses a pretty structured API, and I wrote a website that uses this API to extract information on how, what and when my daughter eats. For each course of her meals (morning snack, lunch, early afternoon snack, since by ~16.30 she is coming home) we get a value that goes from 1 to 4 according to how much of it she ate: 1 if she ate the whole thing, 4 if she didn’t even took a bite.

My first task was to sort all the meals she tried by how much she liked them: while it’s useful to have the information on a day by day basis, having a rating that spans over months or even years could give us ideas on how to feed her when she’s home!

A simple rating based on the average would be not ideal though: most meals she had had less than 4 occurrences in the past ~8 months, but for the snacks, that are usually fruit, and a meal that only occurred twice but was both times eaten fully would immediately become first in the rankings.

I found an algorithm that I really found interesting online: I remember reading about the one reddit uses for their ranking, that considers both the amount of up/downvotes and the average vote, but that does not apply in this situation, since I have 4 possible votes; the one I found works by considering both the votes average and the general average among all the votes, and can be even tuned using a parameter.[1]

This algorithm, paired with the exclusion of all the courses she only had once, created a nice ranking: my daughter favourite meal among the ones at her kindergarten according to this is “Raw sliced carrots with olive oil and lemon juice”, something I never tried cooking for her! She sometimes eats carrots with my homemade hummus, which is pretty similar, but that’s great to know!

This small project could end here, but I wanted to add a few more info: seasonality in weeks, to highlights if some days she eats less/more for some reason, favourite ingredients and a model that, given expected meals, will predict how much she will eat. This last one will be a hard one, but lately I’ve been getting better at this.

My time is up for today, will write more about this likely next time.

Tags: