# Path: pive/visualization/defaults.py



import importlib
from .visualization import defaults as default
    # Load the dataset utilizing the internal input manager.
    def load(self, source):
        """Loads data from a source."""
        try:
            inputdata = self.__inputmanager.read(source)
            self.__suitables = self.__inputmanager.map(inputdata)
            self.__data = inputdata
        except ValueError as e:
            print ("Failed to load the dataset: %s" % e)
            raise

        self.__modules = self.import_suitable_visualizations(self.__suitables)
        self.__has_datefields = self.__inputmanager.has_date_points()
        # Converting the datakeys into strings.
        self.__datakeys = [str(i) for i in list(self.__data[0].keys())]
        return self.__suitables

    @staticmethod
    def import_suitable_visualizations(suitable_visualization_list):
        """Dynamically import all suited visualization modules."""

        mods = []
        for item in suitable_visualization_list:
            mod = '.%s' % item
            mods.append(mod)

        modules = []

        for item in mods:
            modules.append(importlib.import_module(item,

# Path: pive/visualization/defaults.py



# Path: pive/environment.py
import importlib
from .visualization import defaults as default

    # Load the dataset utilizing the internal input manager.
    def load(self, source):
        """Loads data from a source."""
        try:
            inputdata = self.__inputmanager.read(source)
            self.__suitables = self.__inputmanager.map(inputdata)
            self.__data = inputdata
        except ValueError as e:
            print ("Failed to load the dataset: %s" % e)
            raise

        self.__modules = self.import_suitable_visualizations(self.__suitables)
        self.__has_datefields = self.__inputmanager.has_date_points()
        # Converting the datakeys into strings.
        self.__datakeys = [str(i) for i in list(self.__data[0].keys())]
        return self.__suitables

    @staticmethod
    def import_suitable_visualizations(suitable_visualization_list):
        """Dynamically import all suited visualization modules."""

        mods = []
        for item in suitable_visualization_list:
            mod = '.%s' % item
            mods.append(mod)

        modules = []

        for item in mods:
            modules.append(importlib.import_module(item,

                                                   package=default.module_path))