geostates.plot.plot_states
- geostates.plot.plot_states(df, column=None, extra_regions=False, labels='postal', linestyle='solid', cmap='copper_r', legend=None, bins=10)
Plot a choropleth map of the United States.
- dfdataframe
The geodataframe including the column of the value to plot.
- columnstr
Name of the column for the value to plot
- extra_regionsbool, default=False
Adds Guam and Puerto Rico to the plot.
- labelsstring, default ‘postal’
Labels each of the regions on the plot. Options are ‘postal’, ‘values’, and ‘both’. Postal displays the two letter abbreviations for each of the regions on the plot. Values displays the numerical values for the target that are being plotted (these values are rounded to four decimal places). Both plots both the two letter abbreviations for each of the regions and the target values that are being plotted (these values are rounded to four decimal places).
- linestylestring, default ‘dashed’
Line style to place around the inset plots. Options are ‘solid’, ‘dashed’, and ‘none’.
- cmapstr, default=None
Specifies the matplotlib colormap to use.
- legendbool, default=False
Adds a legend object to the map.
- binsint, default=10
Specifies how many bins to group values into for a legend or discrete colorbar.
A choropleth plot of the United States.