Inspiration
There's an image floating around on the internet of a small set of food companies and the many brands they own. The idea is that we have an illusion of choice, that there are only a handful of global conglomerates controlling large sections of our economy. So we thought, what if we could help consumers better understand what they're buying, who they're really buying it from, and how those companies affect the world around them? Even better, what if the users could contact legislators and companies easily, right there from our own app?
2º didn't really start out as a climate project in particular, but it is perfect for connecting companies to their impact on our environment and their influence over politics locally and nationally, perhaps even globally.
What it does
2º is simply a database of information that connects brands and the companies who own them to nearly anything we can gather data on; the information is presented in an easily understood format on a website. We've started with political donations and climate data for only a dozen or so food companies. A user is able to search a brand, company, or politician as of now, but likely we'll expand this in the future.
We've plans to add a lot of features, such as following certain companies, politicians, etc. as well as being able to contact the politicians and companies via social media, phone, and email. We'd like to include legislation specific to climate change and other political/environmental issues as well as expand it beyond the US. The scalability of 2º is nearly endless, especially once the data gathering process is largely automated.
How I built it
We started with a RESTful API using Django Rest Framework. Simply put, the API allows us to pull data from it using various URL endpoints. We filled the database by scraping websites and using other APIs such as OpenSecrets. The climate data is currently hard coded into the front end instead of in the database, but we have plans to add that information into the API soon.
For the frontend, we used React, which is an amazing JavaScript library created by Facebook. React makes creating user interfaces a lot easier than using plain JavaScript, especially when combined with something like DRF. We also used a trial version of a library called CanvasJS to create a few demo charts and graphs.
Challenges I ran into
We ran into a lot of challenges along the way. Neither of us has a lot of coding experience, especially in the libraries we used. React seems to get updated frequently, so we actually used a lot of outdated/deprecated approaches to write the frontend prototype, but have plans to fix all of that over time.
Django Rest Framework presented issues as well, neither of us had ever used it before this project and struggled with creating the many relationships between the various data points. We also ended up having to delay implementing a user authentication system simple due to time constraints created by other obligations.
Moreover, we hit several snags with our data scraping. Neither of us had much experience with it, especially on such a large scale (we scraped every single brand from each company's website). We also deleted our database so we could add some new features and one of our main data sources changed the layout of their site, which meant we had to change our entire scraping approach to get the right information and parse out the rest.
The biggest challenge we faced was likely time. We both have a lot going on in our lives and even took a trip to Austin for another hackathon just days before the deadline for Climathon.
Accomplishments that I'm proud of
Simply completing a prototype gave both of us a great sense of pride. We've also had several people show a lot of interest in the project and, being quite new to coding, that was a new experience on it's own. Furthermore, we've both not had a lot of experience coding with another person and it was great to share the highs and lows along the way. We've built something together that might be able to have real influence on the world around us.
What I learned
So much! We've learned that we've been using React wrong all along, which is frustrating in some ways, but it's a lot better than _ not _ knowing. Django Rest Framework was new to both of us, though we've experience with Django itself, DRF streamlines a lot of the process and has become a go-to for us on other projects as well.
We both learned an exorbitant amount about the companies we've included in the project from studying their sustainability reports and other data. We learned some of the science behind climate change and how emissions are studied.
What's next for 2º
As long as we have enough time to work on the project, we'll likely continue to develop it. We definitely want to add a user authentication system to allow users to create profiles, follow different data points, and rate/review companies and brands. We'd like to include more legislators at the local level and internationally along with legislation. We have plans to add social network links to the site so users can quickly share information to their own social media and direct links to contact legislators and companies by phone, email, or even tag them in social media posts.
The eventual goal is a complete database of all major companies and their brands, where they spend money politically, how the politicians they give money to vote on various legislation, and as much climate data as we can gather. All of this would largely be updated via automation.
Once the API has a larger dataset, it would have value for many people, including politicians to use for their campaign research, journalists, universities, etc. We'd likely offer a free version for limited use and a paid version for large applications.
Log in or sign up for Devpost to join the conversation.