<commit_before>import numpy as np
import geopandas as gpd

from holoviews.core.data import Interface, MultiInterface, PandasInterface
from holoviews.core.data.interface  import DataError
from holoviews.core.util import max_range
from holoviews.element import Path

from ..util import geom_to_array


class GeoPandasInterface(MultiInterface):

    types = (gpd.GeoDataFrame,)

    datatype = 'geodataframe'

    multi = True

    @classmethod
    def init(cls, eltype, data, kdims, vdims):
        if not isinstance(data, gpd.GeoDataFrame):
            raise ValueError("GeoPandasInterface only support geopandas DataFrames.")
        elif 'geometry' not in data:
            raise DataError("GeoPandas dataframe must contain geometry column, "
                            "to plot non-geographic data use pandas DataFrame.", cls)<commit_msg>Fixes for geopandas imports<commit_after>from __future__ import absolute_import

import numpy as np
from geopandas import GeoDataFrame

from holoviews.core.data import Interface, MultiInterface, PandasInterface
from holoviews.core.data.interface  import DataError
from holoviews.core.util import max_range
from holoviews.element import Path

from ..util import geom_to_array


class GeoPandasInterface(MultiInterface):

    types = (GeoDataFrame,)

    datatype = 'geodataframe'

    multi = True

    @classmethod
    def init(cls, eltype, data, kdims, vdims):
        if not isinstance(data, GeoDataFrame):
            raise ValueError("GeoPandasInterface only support geopandas DataFrames.")
        elif 'geometry' not in data:
            raise DataError("GeoPandas dataframe must contain geometry column, "
                            "to plot non-geographic data use pandas DataFrame.", cls)
{'fraction_non_alphanumeric': 0.0655549166187464, 'fraction_numerical': 0.0, 'mean_word_length': 3.496124031007752, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2197306', 'n_tokens_mistral': 514, 'n_tokens_neox': 496, 'n_words': 156}