def plot(self) -> Chart: df = FermentableAnalysis(self.fermentable).amount_per_style() if len(df) == 0: raise NoDataException() figure = PreAggregatedBoxPlot().plot(df, 'beer_style', 'amount_percent', 'Style', '% of Weight in Recipe') return Chart(figure, title=self.get_chart_title())
def plot(self) -> Chart: df = get_fermentable_amount_range_per_style(self.fermentable) if len(df) == 0: raise NoDataException() figure = PreAggregatedBoxPlot().plot(df, 'style', 'amount_percent', 'Style', '% Amount') return Chart(figure, title=self.get_chart_title())
def plot(self) -> Chart: df = get_style_popular_hops(self.style, self.get_use_filter()) if len(df) == 0: raise NoDataException() figure = PreAggregatedBoxPlot().plot(df, 'hop', 'amount_percent', 'Hops by Popularity', '% Amount') return Chart(figure, title=self.get_chart_title())
def plot(self) -> Chart: df = get_hop_amount_range_per_use(self.hop) if len(df) == 0: raise NoDataException() figure = PreAggregatedBoxPlot().plot(df, 'use', 'amount_percent', 'Usage', '% Amount') return Chart(figure, title=self.get_chart_title())
def plot(self) -> Chart: df = HopAnalysis(self.hop).amount_per_use() if len(df) == 0: raise NoDataException() figure = PreAggregatedBoxPlot().plot(df, 'use', 'amount_percent', 'Usage', '% of Weight in Recipe') return Chart(figure, title=self.get_chart_title())
def plot(self) -> Chart: analysis = HopAmountAnalysis(self.recipe_scope) df = analysis.per_hop(num_top=8) if len(df) == 0: raise NoDataException() figure = PreAggregatedBoxPlot().plot(df, 'hop', 'amount_percent', None, '% of Weight in Recipe') return Chart(figure, title=self.get_chart_title())
def plot(self) -> Chart: df = StyleAnalysis( self.style).popular_hops_amount(use_filter=self.filter_param) if len(df) == 0: raise NoDataException() figure = PreAggregatedBoxPlot().plot(df, 'hop', 'amount_percent', None, '% of Weight in Recipe') return Chart(figure, title=self.get_chart_title())
def plot(self) -> Chart: (categories, types) = self.get_filter() df = get_style_popular_fermentables(self.style, categories, types) if len(df) == 0: raise NoDataException() figure = PreAggregatedBoxPlot().plot(df, 'fermentable', 'amount_percent', 'Fermentables by Popularity', '% Amount') return Chart(figure, title=self.get_chart_title())