Projects

Here's a snapshot of some of the things I've been working on. Hope you enjoy them as much as I do.

Closest Cocktail

  • R
  • Shiny
  • UMAP
  • #TidyTuesday

Recommends you a cocktail! You select your favourite cocktail, what ingredients you have on hand and how many new ones you'd be willing to buy. The application then gives you a handful of recommendations based on that information, and lists out the ingredients for each one.

The data comes from #TidyTuesday, and my analysis is heavily inspired by Julia Silge's demonstration of tidymodels using this dataset. I modelled the data with UMAP, and used that to determine similarity of cocktails. For a selected cocktail, the application calculates the euclidean distance between that and all other cocktails in the dataset, using the 2D UMAP space.

With the list of ingredients available, I also set it up to filter out any that need heaps of new ingredients, letting the user determine what constitutes heaps.

This project was my first ever use of Shiny, definitely a steep learning curve.

Recipe Book (no longer linked here)

  • html
  • css
  • js
  • json
  • PowerShell

More of a coding project than a culinary one. I've been keeping track of my recipes in a JSON file for a while, and I recently put together a web layout for the data. I've added a couple of features that I think are pretty cool: cost per serve calculation, scalable ingredients and preset timers. The whole thing is hand-coded by me.

To create a recipe entry, I've written a PowerShell script that prompts for each field and assembles them into a custom [recipe] class before serialising to JSON. One of the class methods calculates the cost per serve of the recipe. To write this I had to write an algorithm to convert between the different units I used in my recipes, and I had to run through Aldi with a spreadsheet.

The PowerShell interface also lets me add timers to the recipe, by giving each a name and a duration in seconds. When I render the website, the JavaScript creates an element for each timer. A single click starts/stops the timer, a double click resets it. My favourite part is that thanks to modern web technology etc, it was trivial to incorporate text-to-speech - instead of ringing, the timer repeats its name over and over again until you reset the timer.