Git Product home page Git Product logo

taco-api's Introduction

TACO API

Brazilian Table of Food Composition (TACO) consumer library

build status dependencies Status devDependencies Status

Project TACO

TACO is an initiative between Nucleus of Studies and Research in Food (NEPA) of UNICAMP with a funding from brazilian Ministry of Health (MS) and Ministry of Social Development and Fight against Hunger (MDS) to provide data of a large number of nutrients in national and regional foods obtained through representative sampling and analysis carried out by laboratories with analytical competence proven by interlaboratory studies, according to international criteria.

Know more (in pt-br)

Getting started

Docker

If you use Docker, instead running this project locally you can simply run Taco API image:

docker pull raulfdm/taco-api

Then, run your container:

docker run -it --rm --name taco -p 4000:4000 raulfdm/taco-api

After that, you can check the API documentation at http://localhost:4000.

Running locally

To run locally, clone this project:

git clone https://github.com/raulfdm/taco-api.git

Then, install all dependencies and run npm start:

cd taco-api
npm install
npm start

After that, you can check the API documentation at http://localhost:4000.

If you want to use docker and run instead, you can use docker-compose:

docker-compose up

About this project

The main goal of this project was to take the data from original research and provide as API using modern development techniques.

Actually the original project have only 2 possible ways to consult the data:

  1. By PDF file. In that case, you have to find the food you want and be sure your looking the correct value;
  2. By tabulated xls. The researchers have created the XLS to be an database, however, they tabulated it and made nice to print, not to filter or to extract. Also there's 3 different sheet containing specific data for the same food.

The way they've chosen can work if you want to do a quick consult, however, if you want to build an application with this data, you have to format it to make it easy to use and that's this project about: better format.

Step-by-step

The following steps describe the whole workflow I did to build this project:

  1. Extract the original xls, cleaning unnecessary styles, columns and rows;
  2. Repeat the above step for each sheet;
  3. Merge all 3 sheets into one;
  4. Generate a CSV (Comma-separated values) and export it to a JSON format;
  5. Create another JSON file containing all categories and then create a relation between FOOD - Category;
  6. Create 2 end-points food and category to get this data

API Documentation

You can consult the API documentation at: https://taco-food-api.herokuapp.com

Official Research

In order to keep the original research as source of truth of this project, I've saved all available files (got from NEPA website). You can consult them in references folder.

Stack


Want to say something?

If you have any question, suggestion or something, please feel free to open an issue. I'll be happy to answer it! :)


Legal Information

This is a non-profit project.

All data provided on this project was researched and produced by UNICAMP, therefore all copyright are reserved to them.

License

MIT

taco-api's People

Contributors

raulfdm avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.