Human-powered destruction of the Earth will continue to ravage our planet--unless we take a more active role in halting it. terraberry enables people to make informed choices conveniently and conscienciously in their daily lives to promote a healthier Earth, with EVERY purchase, EVERY day.
The code presented here is the python backend of the terraberry application, which facilitates sustainable and habitual lifestyle choices to improve the health of the Earth. terraberry allows users to scan the barcode of an item to determine if ingredients are harmful to the environment while in the store, providing consumers with the ability to make choices to reduce the detrimental impact their everyday purchases on the Earth.
This development is brought to you by the first place finish terraberry team via the Space Apps Orlando as part of the Bring Your Own Solution Challenge.
Summary
Example
Environmental Impact
Documentation
Resources
Dependencies
Other Information
Our project enables citizens to use their smartphones when making a purchase to determine whether harmful materials are present in a product. On a daily basis, users can conveniently make informed choices about the products they are buying, while educating themselves about the devastating effects of materials like palm oil, silicates, and triclosan on the well-being of the Earth.
The application will be able to read the barcode of an item, whether food or household. While in a store, a user can whip out their phone, scan an item they are interested in purchasing, and our app informs the user whether the harmful ingredients of palm oil, silicates, or triclosan are present in the item. We also incorporate an informative component to educate users on the world-wide effects of these damaging ingredients. Our product will foster awareness and grant consumers the opportunity to make a conscientious choice about how their purchases affect the environment.
Our android app will be available for download on the play store, with the icon seen in the left image below. The startup is shown in the middle image below, with immediate access to the bar code seen on right.
Once scanned, our app takes the barcode, uses the UPC to find the product name and ingredients, and checks whether materials that can devastate the environment are present. The front end is built in Android Studio and communicates with the Python backend here, which determines if certain materials are contained in the ingredients list of the product. The results are shown to the user, as seen below for Larabar Blueberry Muffin (left) and Cheez Its (right).
At the bottom of the screen, the user has easy access to keep on scanning!
The collection of materials such as silicates, palm oil, and triclosan are damaging to ecological systems, affecting habitats of endangered species as well as contributing in the decline of air and water quality across the globe. We desire to inform consumers and provide them with the power to make educated decisions about the products. We provide the necessary information on effects of materials to the environment, which users can take into account as they make their everday purchases.
For the initial development of terraberry, we currently focus on the following substances:
For each, we provide infographics to present facts for the consumer to interpret. Whenever possible, we include interactive data from NASA satellites. Our goal is to engage the consumer as much as possible so that they can make the most educated choices while purchasing products.
Forest fires set to clear vegetation for oil palm plantations release 0.81-2.57 gigaton of carbon into the atmosphere. This figure shows the number of forest fires (in red) in the Southeast Asian region in 2015 as seen by the NASA MODIS satellite.
Silicates are found as an ingredient in household cleaning products. Improper disposal can raise the alkalinity of water which can be harmful to aquatic life. When inhaled, silicates are a known carcinogen and can pose problems for air quality.
Triclosan is found in many personal care and household items as an antibacterial agent. It is only partially removed during the water sanitation process and triclosan byproducts accumulate in aquatic ecosystems. Triclosan is highly toxic to the algae population and has been detected in fish and shellfish. Higher aquatic organisms are exposed to triclosan by feeding on algae.
Formaldehyde is used as a sterilizing agent and preservative in food, cosmetics, and pesticides. It is a volatile organic compound that can produce ground level ozone, a pollutant damaging to sensitive organisms and ecosystems. Repeated human exposure to formaldehyde can trigger breathing problems such as asthma and bronchitis.
Phthalates are commonly found in plastics and can be released into the environment during the production, processing, and disposal of an item. The breakdown of phthalates in waste seeps into sewage sludge and the soil. Accumulation of phthalates is found in animal tissue. It also reported as a particulate and vapor in the atmosphere, affecting air quality.
We note that the levels of silicates, triclosan, formaldehyde, etc. in products may be safe for humans in small, regulated doses. However, with millions and billions of people across the world using products with these harmful materials, the cumulative effect on the health of the planet can be extremely damaging.
The source code and necessary data files may all be downloaded as a zip, forked, or cloned on a local machine from the terraberry repository.
The primary Python scripts included is HackHTML.py, where the primary function used to determine whether harmful ingredients are present is lookup_barcode(). The frontend android barcode reader will pass the barcode/UPC number to the python script, which will then determine whether silicates, palm oil, triclosan, or their derivatives are present in the scanned product. The results of this are passed back to the front-end of the application.
The files included are in this repository are:
- HackHTML.py: primary code that does searching and cross-correlation of databases/ingredients
- HouseholdDB.txt: list of IDs for household items in NIH/NLM library
- oils.txt: list of palm oil aliases and derivates
- silicates.txt: list of silicate aliases and derivates
- triclosan.txt: list of triclosan aliases and derivatives
If the user has Python and the necessary packages installed, no further installation should be required to run the code. If scripted, code may be run from outside Python with the command-line call 'python example.py' (where example is the name of the script). If inside Python, the functions lookup_barcode() may be called following importing the necessary packages and:
import HackHTML.py as HH ### import python code
HH.lookup_barcode() ### function call
Android Studio
Android Barcode Reader
Environmental Working Group
US Department of Health and Human Services
UPC Lookup Database
NASA Worldview
World Wildlife Federation
Environmental Protection Agency
This Python code was written using Python 2.7 and Numpy 1.10.4, but should be compatible with many other versions. The user may have to install the html, urllib2, re, or cookielib libraries.
Compatible with iPython Notebook (use %run [name]).
Contributors: RWK, TD, KA, WM
Contact: May be made through GitHub.
About the creators: We are a group of PhD Astro students at the University of Florida. We look at all sorts of stars and galaxies in the Universe across space and time. However, we know that nothing is as important as our Earth. We are passionate about improving the well-being of our planet and providing people with the power to make everyday choices that make the world cleaner and healthier.