Insect declines are an active topic of research and often makes the news with concerning headlines of 'insectmageddon'. Big trends like this can be overwhelming and we feel a disconnect from these phenomena. We wanted to create a piece of art that helps users appreciate the diversity in an underappreciated taxonomic group.

We were inspired by two main data sources:

These data sources contained very rich information about species, their ecology and their long term trends. However, excel sheets full of numbers are not engaging and the aim of our project is to bridge the gap from this data to the public through art.

We also used iNaturalist API species images and the locations of a nearby record of that species.

What it does

Hot Moths is an interactive science-fiction experience of a fictional tinder-style dating app that has been constructed by the Human-Moth Relations Consortium as part of a publicity campaign to improve the reputation of moths in popular discourse. We pose that this functionality was enabled by cutting edge research at the UK Centre for Ecology and Hydrology whose AI research has successfully made contact with moths, realising their immense intelligence.

Each species of moth has written themselves a short bio to help humans understand more about them. The user can then decide whether they would like to get to know more about this moth and understand more about their lives.

How we built it

The user interface was adapted from a basic tinder swipe deck template created by Rob Vermeer:

The data was downloaded from EIDC and processed in R using R pacakge dplyr to produce a simplified dataframe containing a set of variables for each moth. For example whether they were resident or migrant, their food preferences and so on. The iNaturalist API was used to get a url for an image for each species. We combined the two EIDC datasets together so that for each species we had their traits and their long term trend from the RIS monitoring dataset.

We wrote a series of short sentences that a moth might include in their profile to reflect each of the variables. For example if a species is resident, this might be translated into their bio as 'local lad'. These were also put in a simple spreadsheet.

Building the moth bios was an exercise in natural language generation (NGL) done in Python by picking relevant sentences from the spreadsheets based on the traits and building bios procedurally from these for each moth. These bios were then input into an html template to build the final website.

Challenges we ran into

Trying to find a narrative in datasets you're not familiar with is quite difficult. In the early stages we were looking through datasets it was quite hard to see how they could be made into art. Actually one of the CDE talks mentioned the need for quick previewing datasets in data portals! In the end we used a dataset Simon had used before (the butterfly traits dataset) but supplemented it with other data not used before.

Picking up a javascript template which looks nice but uses code that we're not familiar with (and not very experienced in javascript!) definitely added some challenges.

Composing moth bios in a way that doesn't seem too generic was also a challenge in the short time available. There's a reason natural language generation (NGL) is a whole field of research and not something we can learn in 2 days. However, we can get surprisngly far just using simple short sentences and randomisation techniques.

Accomplishments that we're proud of

Producing something that works!

What we learned

How to work together to produce something using three different programming languages! This allowed us to use our strengths for each part we worked on by using the language we were most comfortable, but it meant we had to clearly define what each piece of code inputs and outputs so that the next piece of code can pick these up successfully. A good exercise in teamwork.

Creating a natural language generation templating system from scratch in Python using nothing but basic python libraries.

What's next for Hot Moths

The swipe left/right mechanism is quite an interesting user experience that could be used in citizen science more widely. For example, we could show people observations of species and a species identification (made by a human or a computer) and then ask the user to agree or disagree with the identification by swiping, potentially building a game around it to make it more fun and engaging. This could also be used for quick training of an AI supervised learning algorithm.

There are some further additions we'd like to make in terms of connecting more effectively to wildlife recording platforms. For example we could have a third option for 'I have seen this species' which would take people to a site (iNaturalist, iRecord etc.) where they could then supply that data. There is also a web application called What's Flying Tonight which we could link to. Conversely other websites could link to Hot Moths and embed the moth bios in their websites.

Hot Moths could also be extended to other taxonomic groups, for example, Likeminded Ladybirds, Brilliant Birds, Funky Fish etc. the possibilities are endless.

If you 'match' with a moth then it says that soon you will be about to chat with a moth. It would be fantastic to train an AI chatbot to take the personality of each moth based on the text produced for their bios. This might be an interesting experiment to see how well an AI can be trained to become a non-human organism. E.g. if asked for it's favourite food it would answer the correct plant.

The 'i' button should take you to info for the specific moth species but currently it just takes you to the Butterfly Conservation homepage.


The data and code we used can all be found in the github repo at and the website can be seen from the "Try it out" section below.

Share this project: