def mainloop(self):
        """ The main loop.
        """
        #proxy = config.engine.open()

        if len(self.args) != 3:
            self.fatal("You MUST provide names for index (row), column, and value!")

        # Load data
        df = pd.read_json(sys.stdin, orient='records')
        df[self.args[0]] = df[self.args[0]].str.slice(0, 42)
        #print(df[self.args[0]])
        #print(df.head(5))
        df = df.groupby(self.args[:2], as_index=False).mean()

        # Create image
        imagefile = 'heatmap.png'
        self.heatmap(df, imagefile)

        # Optionally show created image
        if self.options.open:
            subprocess.call("xdg-open {} &".format(quoted(imagefile)), shell=True)