Skip to content

Code for the USDA Branded Food Dataset pipeline and the USDA Food Assistant. This project consolidates USDA FoodData Central data into a structured dataset, along with an interactive tool that allows for conversational exploration of food items, nutrients, and ingredients.

License

Notifications You must be signed in to change notification settings

jack-tol/usda-food-data-pipeline

Repository files navigation

USDA Food Data Pipeline & Food Assistant

This repository contains code for processing and refining the USDA FoodData Central (FDC) dataset, a publicly accessible and comprehensive resource providing information on foods available on U.S. consumer shelves. Additionally, it includes the code for the USDA Food Assistant, an interactive tool designed to allow users to explore food data in a conversational format.

Overview

The USDA Food Data Pipeline consolidates and cleans data from the USDA FoodData Central, spanning 34 CSV files, to create a single, structured dataset. This pipeline automates downloading, cleaning, merging, and normalizing the data, making it ready for machine learning and analysis.

The USDA Food Assistant application enables users to interact with this dataset in a conversational format, retrieving detailed food information and answering nutrition-related questions. The assistant combines semantic search with language generation, providing users with contextually relevant answers about ingredients, nutrients, and serving sizes.

Features

  • Data Pipeline: Automates the process of data retrieval, cleaning, and transformation for the USDA FoodData Central dataset.
  • Interactive Assistant: Allows users to query the dataset and receive detailed responses on food items.
  • Semantic Search: Enables similarity-based retrieval of food data using a Pinecone index and a multilingual-e5-large embedding model.
  • Machine-Learning Ready Dataset: Outputs a structured dataset available for various applications.

For more detailed information on this pipeline and assistant, please refer to the blog post linked here.

Dataset Access

The cleaned USDA Branded Food Dataset, created by this pipeline, is available on HuggingFace Datasets here.

Demo

The USDA Food Assistant, hosted on HuggingFace Spaces, can be accessed here.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Code for the USDA Branded Food Dataset pipeline and the USDA Food Assistant. This project consolidates USDA FoodData Central data into a structured dataset, along with an interactive tool that allows for conversational exploration of food items, nutrients, and ingredients.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages