coffee icon

Coffee Python Library

From the CORGIS Dataset Project

By Sam Donald
Version 1.0.0, created 10/28/2022
Tags: Coffee, Cupping

Overview

There is data for both Arabica and Robusta beans, across many countries and professionally rated on a 0-100 scale. All sorts of scoring/ratings for things like acidity, sweetness, fragrance, balance, etc.

https://github.com/rfordatascience/tidytuesday/tree/2e9bd5a67e09b14d01f616b00f7f7e0931515d24/data/2020/2020-07-07

Explore Structure

Each row represents A specific coffee.

Index Type Example Value
0 dict { }
1 dict (same structure)
2 dict (same structure)
... ... ...
Key Type Example Value Description
"Location" dict { }
"Year" int 2010 Production year
"Data" dict { }
Key Type Example Value Description
"Country" str "United States" Country where the coffee was produced
"Region" str "kona" Region where the coffee was produced
"Altitude" dict { }
Key Type Example Value Description
"Min" int 0 Min altitude of the farm
"Max" int 0 Max altitude of the farm
"Average" int 0 Average altitude of the farm
Key Type Example Value Description
"Owner" str "kona pacific farmers cooperative" Owner of the coffee
"Type" dict { }
"Production" dict { }
"Scores" dict { }
"Color" str "Unknown" Bean color
Key Type Example Value Description
"Species" str "Arabica" Species of the coffee
"Variety" str "nan" Variety of the coffee
"Processing method" str "nan" Processing method used
Key Type Example Value Description
"Number of bags" int 25 Number of bags tested
"Bag weight" float 45.3592 Bag weight tested
Key Type Example Value Description
"Aroma" float 8.25 Aroma score 0-10
"Flavor" float 8.42 Flavor score 0-10
"Aftertaste" float 8.08 Aftertaste score 0-10
"Acidity" float 7.75 Acidity score 0-10
"Body" float 7.67 Body score 0-10
"Balance" float 7.83 Balance score 0-10
"Uniformity" float 10.0 Uniformity score 0-10
"Sweetness" float 10.0 Sweetness score 0-10
"Moisture" float 0.0 Moisture score 0-10
"Total" float 86.25 Total score

Downloads

Download all of the following files.

  1. coffee.py
  2. coffee.data

Usage

import coffee
coffee = coffee.get_coffee()

Documentation

get_coffee()
Returns a list of dictionaries representing Coffee.