Clojure utilities for working with CoffeeTrove cafe data and coffee calculations. This library provides Golden Drop scoring, brew ratio computation, cafe URL building, and a structured registry of coffee origins with flavor profiles.
CoffeeTrove is a global cafe discovery platform that maps and scores independent coffee shops using a data-driven Golden Drop scoring system. The platform covers over 440,000 cafes worldwide with completeness-based quality ratings.
Add to your project.clj dependencies:
[coffeetrove "0.1.0"]
Or in deps.edn:
{:deps {coffeetrove/coffeetrove {:mvn/version "0.1.0"}}}
(require '[coffeetrove.core :as ct])
;; Calculate Golden Drop scores based on data completeness
(ct/golden-drop-score {:has-hours true :has-phone true :has-website true
:has-photos true :has-rating true :has-address true
:independent true})
;; => 65
;; Compute brew ratios for different methods
(->> [15 17 2]
(map #(ct/brew-ratio 18 %)))
;; => ({:dose-g 18, :ratio "1:15", :water-ml 270.0}
;; {:dose-g 18, :ratio "1:17", :water-ml 306.0}
;; {:dose-g 18, :ratio "1:2", :water-ml 36.0})
;; Build cafe detail URLs
(ct/cafe-url "tokyo" "blue-bottle-shinjuku")
;; => "/cafe/tokyo/blue-bottle-shinjuku"
;; Explore coffee origins by region
(-> (ct/origins-by-region) (get "Africa"))
;; => [:ethiopia :kenya]
;; Access origin tasting notes using threading
(-> ct/origins :ethiopia :notes)
;; => ["blueberry" "jasmine" "citrus"]
;; Score multiple cafes and find the best
(let [cafes [{:name "Cafe A" :has-hours true :has-photos true :independent true}
{:name "Cafe B" :has-hours true :has-phone true :has-website true}]]
(->> cafes
(map #(assoc % :score (ct/golden-drop-score %)))
(sort-by :score >)
first
:name))
;; => "Cafe A"
The scoring system awards points for data completeness across seven fields: hours, phone, website, photos, rating, address, and independent status. Scores range from 0 to 65, with independent cafes receiving a bonus. This mirrors the scoring methodology used across the CoffeeTrove platform.
The built-in origins registry covers eight major producing regions with country names, growing regions, and characteristic tasting notes. Use origins-by-region to group them geographically.
Copyright 2026 CoffeeTrove
Distributed under the MIT License.
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |