def daily_plot(self, days):
        """Bar plot displaying the number of block visits per day.

        The number of block visits is shown for the `days` days leading to but excluding `self.date`. A day here refers
        to the time from noon to noon. For example, 22 May 2016 refers to the period from 22 May 2016, 12:00 to 23 May
        2016, 12:00.

        Params:
        -------
        days : int
            Number of days.

        Returns:
        --------
        app.plot.plot.TimeBarPlot
            Plot of number of block visits as a function of the day.
        """

        start_date, end_date = day_range(self.date, days)
        trend_func = functools.partial(day_running_average, ignore_missing_values=False)

        df = self.df.copy()
        df['TimeLostToProblemsPercentage'] = 100 * np.divide(df.TimeLostToProblems, df.NightLength)
        df['TimeLostToProblems'] /= 60

        return daily_bar_plot(df=df,
                              start_date=start_date,
                              end_date=end_date,
                              date_column='Date',
                              y_column=['TimeLostToProblems', 'TimeLostToProblemsPercentage'],
                              y_range=[Range1d(start=0, end=250), Range1d(start=0, end=40)],
                              y_formatters=[PrintfTickFormatter(format='%.0fm'), PrintfTickFormatter(format='%.0f%%')],
                              trend_func=trend_func,
                              **self.kwargs)
    def daily_plot(self, days):
        """Bar plot displaying the number of block visits per day.

        The number of block visits is shown for the `days` days leading to but excluding `self.date`. A day here refers
        to the time from noon to noon. For example, 22 May 2016 refers to the period from 22 May 2016, 12:00 to 23 May
        2016, 12:00.

        Params:
        -------
        days : int
            Number of days.

        Returns:
        --------
        app.plot.plot.TimeBarPlot
            Plot of number of block visits as a function of the day.
        """

        start_date, end_date = day_range(self.date, days)
        trend_func = functools.partial(day_running_average,
                                       ignore_missing_values=False)

        return daily_bar_plot(df=self.df,
                              start_date=start_date,
                              end_date=end_date,
                              date_column='Date',
                              y_column='BlockCount',
                              y_range=Range1d(start=0, end=30),
                              trend_func=trend_func,
                              **self.kwargs)
    def daily_plot(self, days):
        """Bar plot displaying the number of block visits per day.

        The number of block visits is shown for the `days` days leading to but excluding `self.date`. A day here refers
        to the time from noon to noon. For example, 22 May 2016 refers to the period from 22 May 2016, 12:00 to 23 May
        2016, 12:00.

        Params:
        -------
        days : int
            Number of days.

        Returns:
        --------
        app.plot.plot.TimeBarPlot
            Plot of number of block visits as a function of the day.
        """

        start_date, end_date = day_range(self.date, days)
        trend_func = functools.partial(day_running_average, ignore_missing_values=False)

        return daily_bar_plot(df=self.df,
                              start_date=start_date,
                              end_date=end_date,
                              date_column='Date',
                              y_column='BlockCount',
                              y_range=Range1d(start=0, end=30),
                              trend_func=trend_func,
                              **self.kwargs)
    def daily_plot(self, days):
        """Bar plot displaying the operation efficiency per day.

        The operation efficiency is shown for the `days` days leading to but excluding `self.date`. A day here refers
        to the time from noon to noon. For example, 22 May 2016 refers to the period from 22 May 2016, 12:00 to 23 May
        2016, 12:00.

        Params:
        -------
        days : int
            Number of days.

        Returns:
        --------
        app.plot.plot.TimeBarPlot
            Plot of operation efficiency as a function of the day.
        """

        df = self.df.copy()
        df['OperationEfficiency'] = 100 * np.divide(df.ObsTime, df.ScienceTime)

        start_date, end_date = day_range(self.date, days)
        trend_func = functools.partial(day_running_average,
                                       ignore_missing_values=True)

        return daily_bar_plot(
            df=df,
            start_date=start_date,
            end_date=end_date,
            date_column='Date',
            y_column='OperationEfficiency',
            y_range=Range1d(start=0, end=140),
            trend_func=trend_func,
            y_formatters=[PrintfTickFormatter(format='%d%%')],
            **self.kwargs)
    def daily_plot(self, days):
        """Bar plot displaying the operation efficiency per day.

        The operation efficiency is shown for the `days` days leading to but excluding `self.date`. A day here refers
        to the time from noon to noon. For example, 22 May 2016 refers to the period from 22 May 2016, 12:00 to 23 May
        2016, 12:00.

        Params:
        -------
        days : int
            Number of days.

        Returns:
        --------
        app.plot.plot.TimeBarPlot
            Plot of operation efficiency as a function of the day.
        """

        df = self.df.copy()
        df['OperationEfficiency'] = 100 * np.divide(df.ObsTime, df.ScienceTime)

        start_date, end_date = day_range(self.date, days)
        trend_func = functools.partial(day_running_average, ignore_missing_values=True)

        return daily_bar_plot(df=df,
                              start_date=start_date,
                              end_date=end_date,
                              date_column='Date',
                              y_column='OperationEfficiency',
                              y_range=Range1d(start=0, end=140),
                              trend_func=trend_func,
                              y_formatters=[PrintfTickFormatter(format='%d%%')],
                              **self.kwargs)
    def daily_plot(self, days):
        """Bar plot displaying the number of block visits per day.

        The number of block visits is shown for the `days` days leading to but excluding `self.date`. A day here refers
        to the time from noon to noon. For example, 22 May 2016 refers to the period from 22 May 2016, 12:00 to 23 May
        2016, 12:00.

        Params:
        -------
        days : int
            Number of days.

        Returns:
        --------
        app.plot.plot.TimeBarPlot
            Plot of number of block visits as a function of the day.
        """

        start_date, end_date = day_range(self.date, days)
        trend_func = functools.partial(day_running_average, ignore_missing_values=False)

        df = self.df.copy()
        df['EngineeringTimePercentage'] = 100 * np.divide(df.EngineeringTime, df.NightLength)
        df['EngineeringTime'] /= 60

        return daily_bar_plot(df=df,
                              start_date=start_date,
                              end_date=end_date,
                              date_column='Date',
                              y_column=['EngineeringTime', 'EngineeringTimePercentage'],
                              y_range=[Range1d(start=0, end=200), Range1d(start=0, end=30)],
                              y_formatters=[PrintfTickFormatter(format='%.0fm'), PrintfTickFormatter(format='%.0f%%')],
                              trend_func=trend_func,
                              **self.kwargs)