Inspiration

The purpose of this project was to make it easier for people to be healthy. Our inspiration came from the Good Health and Well-Being Sustainable Development Goal, offering a more prosperous world and hope for a better future in which the world is more health conscious.

What it does

Takes user input of a food and returns the nutrition facts of that food per 100 grams.

How we built it

We used the FoodData Central API to fetch the food nutrients using JavaScript, which displays this data into our HTML and CSS webapp.

Challenges we ran into

Retrieving the correct data for the provided user input was a challenge. The API that we used, FoodData Central had many different types of one food, for example, if the user input was "apple", you would find candied, dried, raw, baked, cider, chocolate covered apples and so on. We just wanted an average apple, which we managed by changing the data type parameter that our code was using to retrieve the data from FoodData Central.

Accomplishments that we're proud of

Retrieving data from an external database and displaying it in our own project, this data could be used for many future ideas for this project.

What we learned

How to use an API to retrieve data from a database and incorporate this into our own project.

What's next for Food Tracker

Add a "Favourite foods" list allowing users to refer back to a list of their most used/favourite foods.

Built With

Share this project:

Updates