async init(monitorID) {
        this.monitorID = monitorID;

        let now = this.getCurrentDate();

        // Load minutely data from database (recent 24 hours only)
        let minutelyStatBeans = await R.find("stat_minutely", " monitor_id = ? AND timestamp > ? ORDER BY timestamp", [
            monitorID,
            this.getMinutelyKey(now.subtract(24, "hour")),
        ]);

        for (let bean of minutelyStatBeans) {
            let data = {
                up: bean.up,
                down: bean.down,
                avgPing: bean.ping,
                minPing: bean.pingMin,
                maxPing: bean.pingMax,
            };

            if (bean.extras != null) {
                data = {
                    ...data,
                    ...JSON.parse(bean.extras),
                };
            }

            let key = bean.timestamp;
            this.minutelyUptimeDataList.push(key, data);
        }

        // Load hourly data from database (recent 30 days only)
        let hourlyStatBeans = await R.find("stat_hourly", " monitor_id = ? AND timestamp > ? ORDER BY timestamp", [
            monitorID,
            this.getHourlyKey(now.subtract(30, "day")),
        ]);

        for (let bean of hourlyStatBeans) {
            let data = {
                up: bean.up,
                down: bean.down,
                avgPing: bean.ping,
                minPing: bean.pingMin,
                maxPing: bean.pingMax,
            };

            if (bean.extras != null) {
                data = {
                    ...data,
                    ...JSON.parse(bean.extras),
                };
            }

            this.hourlyUptimeDataList.push(bean.timestamp, data);
        }

        // Load daily data from database (recent 365 days only)
        let dailyStatBeans = await R.find("stat_daily", " monitor_id = ? AND timestamp > ? ORDER BY timestamp", [
            monitorID,
            this.getDailyKey(now.subtract(365, "day")),
        ]);

        for (let bean of dailyStatBeans) {
            let data = {
                up: bean.up,
                down: bean.down,
                avgPing: bean.ping,
                minPing: bean.pingMin,
                maxPing: bean.pingMax,
            };

            if (bean.extras != null) {
                data = {
                    ...data,
                    ...JSON.parse(bean.extras),
                };
            }

            this.dailyUptimeDataList.push(bean.timestamp, data);
        }
    }
Initialize the uptime calculator for a monitor
@param {number} monitorID the id of the monitor
@returns {Promise<void>}