contributions– contains information about political donations made in the New York City area, including party affiliation, the amount of the donation, and location of the donor.
pointcolorscale and show the effects of various adjustments. Any changes made to Vega code are isolated to that scale definition.
thresholdscales) and outputs a color range. In the following code snippet, the density accumulator has been added to the linear
maxDensityCntproperties. After normalization,
minDensityCntrefers to 0 and
maxDensityCntrefers to 1 in the domain. In this case, 0 in the domain equates to a per-pixel count of 1, and 1 in the domain equates to a per-pixel count of 100.
maxDensityCntare required properties. They can have explicit integer values, or they can use keywords that automatically compute statistical information about the per-pixel counts. Currently available keywords are:
minDensityCnt, and the maximum aggregated count used as the
maxDensityCnt. This results in the following:
maxDensityCnt. However, if your
minvalue is greater than your
maxvalue, your image might look inverted.
R(republican) are colored red,
D(democrat) are colored blue, and everything else is colored green.
"accumulator": "blend"property to an ordinal scale.
fieldproperty is required in
markproperties that reference blend accumulator scales.
pct) mode can help you visualize how prevalent a specific category is based on a percantage. Any scale can be used in percentage mode, but the domain values must be between 0 and 1, where 0 is 0% and 1 is 100%.
recipient_partyof “R” (republican) is more prevalent.
pctCategoryis a required property for percentage mode and can be numeric or a string. A string refers to a string value from a dictionary-encoded column.
pctscale to the following:
pctCategoryMarginproperty to buffer numeric
pctCategoryvalues, so you can use a range for the numeric category.