Artificially Reducing Intelligence (Pt. 1)

Posted on Sun 06 June 2021 in python

Carrying on with the fermentation theme, my long term goal is to use machine learning to design an (possibly) awesome beer recipe. However, in order to train a model, we need some data linking to recipes to consumer opinions. While there are lots of online resources for opinions, commercial beer recipes are often guarded secrets, and it's especially rare that they are shared following a structured data format. One (sort of) exception to this rule is the BrewDog DIY Dog. The catalogue of all BrewDog recipes is published anually in pdf format allowing homebrewers to have a go themselves. While recipes are largely written in a consistent way, some challenges existed in parsing the data to a machine readable format - and a couple of different libraries (PyPDF2 and tabula-py) were required.


Continue reading

Visualising Water Profiles

Posted on Sun 11 April 2021 in python

Here's the first post of a few planned within a fermentation series. One of the key ingredients to any drink, whether beer, kombucha, hop water etc is of course water, and not all waters are created equal. If water is the base of a drink, some flavours are better complimenteted by a blank canvas, while minerality can be used to make certain flavours pop. A common analogy is when cooking, flavours are brought out using salt, vinegar and other condiments. Getting this balance right can make all difference. Conversely if you're starting point is too rich in these properties, it's probably worth considering diluting, or even switching out for low-minerality bottled water. A common recommendation is to look in to the properties of your water at home, investigate what the properties of your water are, and see where you can go from there to tweak your water profile using common additives such as gypsum, baking soda and salt.


Continue reading

Reactive

Posted on Sun 28 February 2021 in misc

It's been a while since I've had the chance to post, and that's mostly because I switched from pursuing a career change in to data science, to actually beginning a full-time career (in addition to finishing my Masters degree in Data Science from Birkbeck). However, now that my thesis is handed in, I'm keen to get back to exploring why I became interested in using Python and Data Science to begin with. I've also picked up a new hobby during lockdown, fermenting homemade beer and kombucha, so have started to explore some projects in this space too. Until next time..


Continue reading

Python User Interface (Jupyter Widgets)

Posted on Tue 25 June 2019 in python

With exams over I can finally start concentrating on finding a job posting more to my blog. I have been working on a Sudoku solver and puzzle generator over the past couple of months and was keen to write this up now I have the time, but I felt frustrated that the code wasn't really going to be of use without some form of web based user interface.

A Web Based Python UI?

After exploring multiple options I'm still not convinced there is an ideal solution that doesn't involve learning Javascript or migrating the site from GitHub. If I'm overlooking something obvious please leave a comment. The best solution I can find is to impliment a degree of interactivity using Jupyter Notebook Widgets, unfortunately this interactivity is lost when converting the notebooks to html using Pelican, so it's still neccessary to link to the file hosted on GitHub. Either way, I'm excited about the potential this functionality offers for some other projects I have in mind for the future.


Continue reading

Webscraping Metacritic

Posted on Wed 27 February 2019 in python

In looking for interesting data sets to play with I'm often searching through Kaggle thinking 'this looks awesome, but if only it had this attribute' or 'data covering a different time period'. Most recently, this happened when looking through the 'Kaggle data set for metacritic'. The natural next step was to start looking at scraping my own data, which is the process I want to cover in this post.

Inevitably the html syntax for metacritic has changed from the process documented in the Kaggle kernel, so a reworking of the html parsing has been required, which also makes this an excellent excuse to get some practise in natural languages and parsing, thanks Chomsky!


Continue reading