geemap/geemap.py
def add_census_data(self, wms, layer, census_dict=None, **kwargs):
        """Adds a census data layer to the map.

        Args:
            wms (str): The wms to use. For example, "Current", "ACS 2021", "Census 2020".  See the complete list at https://tigerweb.geo.census.gov/tigerwebmain/TIGERweb_wms.html
            layer (str): The layer name to add to the map.
            census_dict (dict, optional): A dictionary containing census data. Defaults to None. It can be obtained from the get_census_dict() function.
        """

        try:
            if census_dict is None:
                census_dict = get_census_dict()

            if wms not in census_dict.keys():
                raise ValueError(
                    f"The provided WMS is invalid. It must be one of {census_dict.keys()}"
                )

            layers = census_dict[wms]["layers"]
            if layer not in layers:
                raise ValueError(
                    f"The layer name is not valid. It must be one of {layers}"
                )

            url = census_dict[wms]["url"]
            if "name" not in kwargs:
                kwargs["name"] = layer
            if "attribution" not in kwargs:
                kwargs["attribution"] = "U.S. Census Bureau"
            if "format" not in kwargs:
                kwargs["format"] = "image/png"
            if "transparent" not in kwargs:
                kwargs["transparent"] = True

            self.add_wms_layer(url, layer, **kwargs)

        except Exception as e:
            raise Exception(e)
Adds a census data layer to the map.

        Args:
            wms (str): The wms to use. For example, "Current", "ACS 2021", "Census 2020".  See the complete list at https://tigerweb.geo.census.gov/tigerwebmain/TIGERweb_wms.html
            layer (str): The layer name to add to the map.
            census_dict (dict, optional): A dictionary containing census data. Defaults to None. It can be obtained from the get_census_dict() function.
        
Adds a census data layer to the map.
Adds a census data layer to the map .
def add_census_data(self, wms, layer, census_dict=None, **kwargs):
        try:
            if census_dict is None:
                census_dict = get_census_dict()
            if wms not in census_dict.keys():
                raise ValueError(
                    f"The provided WMS is invalid. It must be one of {census_dict.keys()}"
                )
            layers = census_dict[wms]["layers"]
            if layer not in layers:
                raise ValueError(
                    f"The layer name is not valid. It must be one of {layers}"
                )
            url = census_dict[wms]["url"]
            if "name" not in kwargs:
                kwargs["name"] = layer
            if "attribution" not in kwargs:
                kwargs["attribution"] = "U.S. Census Bureau"
            if "format" not in kwargs:
                kwargs["format"] = "image/png"
            if "transparent" not in kwargs:
                kwargs["transparent"] = True
            self.add_wms_layer(url, layer, **kwargs)
        except Exception as e:
            raise Exception(e)
def add_census_data ( self , wms , layer , census_dict = None , ** kwargs ) : try : if census_dict is None : census_dict = get_census_dict ( ) if wms not in census_dict . keys ( ) : raise ValueError ( f"The provided WMS is invalid. It must be one of {census_dict.keys()}" ) layers = census_dict [ wms ] [ "layers" ] if layer not in layers : raise ValueError ( f"The layer name is not valid. It must be one of {layers}" ) url = census_dict [ wms ] [ "url" ] if "name" not in kwargs : kwargs [ "name" ] = layer if "attribution" not in kwargs : kwargs [ "attribution" ] = "U.S. Census Bureau" if "format" not in kwargs : kwargs [ "format" ] = "image/png" if "transparent" not in kwargs : kwargs [ "transparent" ] = True self . add_wms_layer ( url , layer , ** kwargs ) except Exception as e : raise Exception ( e )
Adds a census data layer to the map.
Adds a census data layer to the map .
"""Adds a census data layer to the map.

        Args:
            wms (str): The wms to use. For example, "Current", "ACS 2021", "Census 2020".  See the complete list at https://tigerweb.geo.census.gov/tigerwebmain/TIGERweb_wms.html
            layer (str): The layer name to add to the map.
            census_dict (dict, optional): A dictionary containing census data. Defaults to None. It can be obtained from the get_census_dict() function.
        """
self
wms
The wms to use.
The wms to use .
layer
The layer name to add to the map.
The layer name to add to the map .
census_dict
A dictionary containing census data. Defaults to None. It can be obtained from the get_census_dict() function.
A dictionary containing census data . Defaults to None . It can be obtained from the get_census_dict () function .
None. It can be obtained from the get_census_dict() function