def from_dict(self, groups, data):
        """Populate FlatTable based on groups and data.

        :param groups: List of group name.
        :type groups: list

        :param data: Dictionary of raw table.
        :type data: list

        example of groups: ["road_type", "hazard"]
        example of data: [
            ["residential", "low", 50],
            ["residential", "medium", 30],
            ["secondary", "low", 40],
            ["primary", "high", 10],
            ["primary", "medium", 20]
            ]
        """
        self.groups = tuple(groups)
        for item in data:
            kwargs = {}
            for i in range(len(self.groups)):
                kwargs[self.groups[i]] = item[i]
            self.add_value(item[-1], **kwargs)

        return self
Populate FlatTable based on groups and data.

        :param groups: List of group name.
        :type groups: list

        :param data: Dictionary of raw table.
        :type data: list

        example of groups: ["road_type", "hazard"]
        example of data: [
            ["residential", "low", 50],
            ["residential", "medium", 30],
            ["secondary", "low", 40],
            ["primary", "high", 10],
            ["primary", "medium", 20]
            ]