How to use the regionmask.core._geopandas.from_geopandas function in regionmask

To help you get started, we’ve selected a few regionmask examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mathause / regionmask / regionmask / defined_regions / _ar6_pre_revisions.py View on Github external
def separate_pacific(self):
        if self._separate_pacific is None:
            # need to fix the duplicates
            df = self._df.copy()
            df["V2"] = _enumerate_duplicates(df["V2"])

            self._separate_pacific = from_geopandas(
                df,
                names="V2",
                abbrevs="V3",
                name=self._name + "(separate Pacific regions)",
                source=self._source,
            )

        return self._separate_pacific
github mathause / regionmask / regionmask / defined_regions / _ar6.py View on Github external
def all(self):
        if self._all is None:
            self._all = from_geopandas(
                self._df,
                names="Name",
                abbrevs="Acronym",
                name=self._name,
                source=self._source,
            )

        return self._all
github mathause / regionmask / regionmask / defined_regions / _ar6_pre_revisions.py View on Github external
def all(self):
        if self._all is None:

            self._all = from_geopandas(
                self._df_combined,
                names="V2",
                abbrevs="V3",
                name=self._name,
                source=self._source,
            )

        return self._all
github mathause / regionmask / regionmask / defined_regions / _ar6.py View on Github external
def ocean(self):
        if self._ocean is None:

            ocean = self._df.Type.str.contains("Ocean")

            self._ocean = from_geopandas(
                self._df.loc[ocean],
                names="Name",
                abbrevs="Acronym",
                name=self._name + " (ocean only)",
                source=self._source,
            )

        return self._ocean
github mathause / regionmask / regionmask / defined_regions / _ar6.py View on Github external
def land(self):
        if self._land is None:

            land = self._df.Type.str.contains("Land")

            self._land = from_geopandas(
                self._df.loc[land],
                names="Name",
                abbrevs="Acronym",
                name=self._name + " (land only)",
                source=self._source,
            )

        return self._land