function to calculate entropy - this is just one minus the advantage ratio
1 | entropy(x)
|
x |
matrix or dataframe where columns are years, rows are parties, and entries are voteshare |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.