Skip to main content
The Math node is used to perform calculations, generally involving either the output to the VoteHub forecast or other demographic data.

Examples

Multiply Add

The Multiply Add node multiplies a Value by the Multiplier, then adds the Addend. It may be used to simulate turnout (e.g., college educated voters (Value) will overall comprise 1.25 (Multiplier) times the electorate than their population share, and are 3 (Addend) percent more likely to vote).

Logarithm/Square Root/Inverse Square Root

The Logarithm, Square Root, and Inverse Square Root nodes are useful for simulating a variable with diminishing returns. The Logarithm node takes the Base logarithm of a Value, and is useful for variables with a large scale, like median household income. The Inverse Square Root node takes one divided by the square root of the Value, and is useful for variables with a quick falloff.

Trigonometric Functions

The trigonometric functions are based on radians, and are useful for capturing non-linear relationships between variables. For example, the Arctangent and Hyperbolic Tangent functions are useful for simulating saturation effects (e.g., shift among Hispanic voters tails off as a greater percent of the county is Hispanic); the Arcsine and Arccosine functions are useful for simulating effects at extreme values (e.g., the greater or smaller the population density of a county is, the more extreme their shift towards or against a candidate is); and the Arctan2 and the Hyperbolic Cosine functions are useful for simulating diverging trends (e.g., a shift towards a candidate is larger when either a district has a high or low college educated population, but not if it is average).