<jupyter_start><jupyter_text><jupyter_code>!pip install plotly
!pip install plotly-geo
!pip install geopandas --upgrade
!pip install pyshp==1.2.10
!pip install shapely==1.6.3
import plotly.figure_factory as ff

import numpy as np
import pandas as pd
df_sample = pd.read_csv('https://raw.githubusercontent.com/nytimes/covid-19-data/master/live/us-counties.csv')
df_sample_r = df_sample[df_sample['state'] == 'North Carolina']
covid_cases = df_sample_r['cases'].tolist()
fips = df_sample_r['fips'].tolist()
endpts = list(np.mgrid[min(covid_cases):max(covid_cases):9j])
colorscale = ["#0A2F51",
"#0E4D64",
"#137177",
"#188977",
"#1D9A6C",
"#39A96B",
"#56B870",
"#74C67A",
"#99D492",
"#BFE1B0",
"#DEEDCF"]
fig = ff.create_choropleth(
    fips=fips, values=covid_cases, scope=['North Carolina'], show_state_data=True,
    colorscale=colorscale, binning_endpoints=endpts, round_legend_values=True,
    plot_bgcolor='rgb(229,229,229)',
    paper_bgcolor='rgb(229,229,229)',
    legend_title='Covid cases by County',
    county_outline={'color': 'rgb(255,255,255)', 'width': 0.5},
    exponent_format=True,
)
fig.layout.template = None
fig.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17123287671232876, 'fraction_numerical': 0.0702054794520548, 'mean_word_length': 7.062068965517241, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, '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}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '575324', 'license': 'MIT', 'n_tokens_mistral': 531, 'n_tokens_neox': 479, 'n_words': 76, 'path': 'Covid19_NC.ipynb', 'repo_name': 'csyork19/Covid19_NC', 'size': '1168'}