class_docstr: Test class for the Folium library.
class_docstr_tok: ["Test","class","for","the","Folium","library","."]
docstr: Test to make sure that Choropleth function does complete the lookup
  between a GeoJSON generated from a GeoDataFrame and data from the GeoDataFrame itself.
  
  key_on field is dtype = str, while column 0 is dtype = int
  All geometries have matching values (no nan_fill_color allowed)
docstr_tok: ["Test","to","make","sure","that","Choropleth","function","does","complete","the","lookup","between","a","GeoJSON","generated","from","a","GeoDataFrame","and","data","from","the","GeoDataFrame","itself",".","key_on","field","is","dtype","=","str",",","while","column","0","is","dtype","=","int","All","geometries","have","matching","values","(","no","nan_fill_color","allowed",")"]
code: def test_choropleth_geopandas_numeric(self):
      """Test to make sure that Choropleth function does complete the lookup
      between a GeoJSON generated from a GeoDataFrame and data from the GeoDataFrame itself.
  
      key_on field is dtype = str, while column 0 is dtype = int
      All geometries have matching values (no nan_fill_color allowed)
      """
      with open(os.path.join(rootpath, "geo_grid.json")) as f:
          geo_data = json.load(f)
  
      geo_data_frame = gpd.GeoDataFrame.from_features(
          geo_data["features"]
      )
      geo_data_frame.crs = {"init": "epsg:4326"}
      fill_color = "BuPu"
      key_on = "feature.id"
  
      Choropleth(
          geo_data=geo_data_frame.geometry,
          data=geo_data_frame.value,
          key_on=key_on,
          fill_color=fill_color,
          fill_opacity=0.543212345,
          nan_fill_color="a_random_color",
          nan_fill_opacity=0.123454321,
      ).add_to(self.m)
  
      out = self.m._parent.render()
      out_str = "".join(out.split())
  
      assert (
          '"fillColor":"a_random_color","fillOpacity":0.123454321'
          not in out_str
      )
      assert '"fillOpacity":0.543212345' in out_str
  
imports: import json
  import os
  import branca.element
  import geopandas
  import jinja2
  import numpy
  import pandas
  import pytest
  import xyzservices.providers
  from jinja2 import Environment, PackageLoader
  from jinja2.utils import htmlsafe_json_dumps
  import folium
  from folium import TileLayer
  from folium.features import Choropleth, GeoJson
label_desc: Use image node_id 10 for calling the TestFolium obj's underlying member method code with example usage: obj.test_choropleth_geopandas_numeric() without return types