Inspiration
Although '‘62% of school leavers said they were very or fairly concerned about climate change’, ‘only 18% could correctly identify that the industry, electrical and heat production sector was the biggest contributor to global warming’: the conclusion of an Ipsos study conducted jointly with the Royal Meteorological Society. (Despite around Half of School Leavers (54%) Saying They Have Had Education on Climate Change in the Past Year, Confusion and Misunderstanding Prevail, 2022). There is clearly a lack of engaging and informative resources to raise awareness about how smaller governmental policies in various industries can snowball into a range of disastrous effects on our world.
What it does
Climate systems are obviously (almost) inextricably intertwined. Carbon emissions leads to enhanced greenhouse effect, which leads to global warming, which leads to the melting of the polar caps, which leads to less albedo effect (reflection of the atmosphere's warmth). The program poses a series of questions to the user, treating them like a policymaker in charge of decisions that potentially impact the lives of millions. While other simulators may limit their users to multiple choice situations, or sliders to decrease and increase certain variables, my solution allows the user to enter free text (i.e. anything they would like) and then the program, first decomposes it into tokens and then uses sentiment analysis, aided by the use of both a positive and negative 'token bank' to evaluate how 'climate-conscious' a user's decision is and then produces a number which can then be supplied to the climate model for predictions.
How I built it
I made this problem suitable to be solved computationally by applying abstraction to simplify the problem (for example, I treated the entire world's emissions as one, instead of getting each country's emissions individually) I had the opportunity to apply my Physics knowledge and first use a 'Naked Planet' model (a model of the temperature of the Earth with no atmosphere), upon which I implemented a layer of greenhouse gas to insulate the planet. I also have functions for calculating sea level, which feed into calculating the albedo effect. Mimicking the logical chain of events was instrumental to being able to recreate the intricate processes happening around us all the time.
Challenges I ran into
I utilised many (many) global variables so that all my functions were integrated with each other. Unfortunately, this also meant that these variables were not protected from unwanted editing (like local variables would have been), so I had to revise some of the logic in my procedures as well as adding validation and type checks to ensure that the probability of logic or syntax errors were minimised.
Accomplishments that we're proud of
I am also part of a team whose work I am very proud to have contributed to (shoutout to the 'GitHub Gods'). We finished our initial goal with about 5 hours to spare, and I was so motivated by this idea that I had to get it out of my head and into code. However, this was, as you can imagine, a very tight deadline. I managed to get all the climate logic modules working, and I am very pleased with this! I also managed to use matplot to create graphs illustrating how the user's decisions had affected the state of the world over time.
What I learned
Global variables are very susceptible to being affected by logic errors. For an added layer of security, perhaps I should have had a local variable in the function, which was then validated before being sent to the global variable, to avoid the many bugs I had initially.
What's next for 'A Hot Mess'
In further iterations, I would love to include a GUI. I was limited to a simple, but effective CLI, paired with graphs. I think a GUI would take me a little longer to implement, but would go far in demonstrating the power of chain reactions further, especially when coupled with some simple animations.
Log in or sign up for Devpost to join the conversation.