Liking cljdoc? Tell your friends :D

coffeetrove.core

Utility functions for CoffeeTrove cafe data and coffee calculations. Provides Golden Drop scoring, brew ratio computation, cafe URL building, and a registry of coffee origins with flavor profiles.

Utility functions for CoffeeTrove cafe data and coffee calculations.
Provides Golden Drop scoring, brew ratio computation, cafe URL building,
and a registry of coffee origins with flavor profiles.
raw docstring

brew-ratioclj

(brew-ratio dose-grams ratio-water)

Calculate water needed for a given coffee dose and target ratio. Standard ratios: 1:15 for pour-over, 1:2 for espresso, 1:17 for drip. Returns a map with dose, ratio, and water amounts.

(brew-ratio 18 15) ;; => {:dose-g 18, :ratio "1:15", :water-ml 270.0}

Calculate water needed for a given coffee dose and target ratio.
Standard ratios: 1:15 for pour-over, 1:2 for espresso, 1:17 for drip.
Returns a map with dose, ratio, and water amounts.

(brew-ratio 18 15)
;; => {:dose-g 18, :ratio "1:15", :water-ml 270.0}
sourceraw docstring

cafe-urlclj

(cafe-url city-slug cafe-slug)

Build a CoffeeTrove cafe detail URL from city and cafe slugs.

(cafe-url "paris" "cafe-de-flore") ;; => "/cafe/paris/cafe-de-flore"

Build a CoffeeTrove cafe detail URL from city and cafe slugs.

(cafe-url "paris" "cafe-de-flore")
;; => "/cafe/paris/cafe-de-flore"
sourceraw docstring

golden-drop-scoreclj

(golden-drop-score cafe-data)

Calculate a Golden Drop score (0-65) for a cafe based on data completeness. Takes a map of boolean flags indicating which data fields are present. Independent cafes receive a bonus.

(golden-drop-score {:has-hours true :has-phone true :has-website false :has-photos true :has-rating true :has-address true :independent true}) ;; => 57

Calculate a Golden Drop score (0-65) for a cafe based on data completeness.
Takes a map of boolean flags indicating which data fields are present.
Independent cafes receive a bonus.

(golden-drop-score {:has-hours true :has-phone true :has-website false
                    :has-photos true :has-rating true :has-address true
                    :independent true})
;; => 57
sourceraw docstring

originsclj

Map of coffee origins with country, region, and tasting notes.

Map of coffee origins with country, region, and tasting notes.
sourceraw docstring

origins-by-regionclj

(origins-by-region)

Group coffee origins by their growing region. Returns a map of region names to vectors of origin keywords.

(origins-by-region) ;; => {"Africa" [:ethiopia :kenya], "South America" [:colombia :brazil], ...}

Group coffee origins by their growing region.
Returns a map of region names to vectors of origin keywords.

(origins-by-region)
;; => {"Africa" [:ethiopia :kenya], "South America" [:colombia :brazil], ...}
sourceraw docstring

scoring-weightsclj

Weights for each data completeness field in Golden Drop score calculation.

Weights for each data completeness field in Golden Drop score calculation.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close