Skip to content

Choropleth Colors not Displaying #220

@joshdelarosa1

Description

@joshdelarosa1

Like issue #92, the colors on the Choropleth are not displaying. What is odd is the quantiles are being set and the data.json file contains the valid values, but all of the shapes of the same color.

I'm doing something wrong, but can't figure out what it is. The data files are in the same directory, so the solution isn't the same as #92.

import folium
import pandas as pd

state_geo = r'gz_2010_us_040_00_20m.json'
population = r'd.csv'

state_data = pd.read_csv(population)

#Let Folium determine the scale
map = folium.Map(location=[48, -102], zoom_start=3)
map.geo_json(geo_path=state_geo, data=state_data, data_out='data.json',
                columns=['state', 'D001'],
                key_on='feature.NAME',
                fill_color='YlGn', fill_opacity=0.7, line_opacity=0.1,
                legend_name='population')
map.create_map(path='index.html')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions