plot_polys()#
- liesel_gam.plot_polys(region, which, df, polys, show_unobserved=True, observed_color='none', unobserved_color='red')[source]#
Plot data on a map of regions defined by a dictionary of polygons.
- Parameters:
region (
str) – Name of the region column in the dataframe passed todf.which (
str|Sequence[str]) – Name of the column in the dataframe passed todfthat should be used as the fill color for the plotted regions.polys (
Mapping[str,Array|ndarray|bool|number|bool|int|float|complex]) – Dictionary of arrays. The keys of the dict are the region labels. The corresponding values define the region by defining polygons. The neighborhood structure can be inferred from this polygon information.show_unobserved (
bool, default:True) – Only has an effect ifdfcontains a column named"observed". Ifshow_unobserved=True, or the column"observed"does not exist, then all regions will be plotted with color based on the column named inwhich. Ifshow_unobserved=False, color filling will be applied only to the rows indfwithobserved=true.observed_color (
str, default:'none') – Border color for observed regions.unobserved_color (
str, default:'red') – Border color for unobserved regions.
- Return type:
ggplot