• Image rendering with polygons

    During my masters, I took a course called Physics of Algorithms – this is largely where I developed an interest in nature inspired algorithms. For my exam, I worked on an algorithm that could render images using polygons. This is not an original idea – Roger Johansson was one of the first to do this back in 2008. However at the time, I had not come across existing versions that would successfully run in Python 2.7 or 3.6, and the original program was written in .NET 2.0/VS.NET 2008. I therefore decided to recreate his project in Python for my final report, which you can take a look at here (all…

  • Text mining with Python

    In my last post, I introduced the method I am employing for the qualitative discourse analysis of my interviews. Here, I want to introduce some of the tools I have used to build my script. Reading multiple .txt files All interview transcriptions were saved as .txt files and read into Python using the os and pandas packages. Saving the main directory (containing all interview files) address as a variable, I could easily extract all files from the directory with the correct format name like this: Removing punctuation and irrelevant breaks To remove excess spacing and irrelevant punctuation, each interview content is converted into a giant string and I simply used…