# public-choice

> Voting / Polling Web Component

Latest version **0.0.9** (published 2020-05-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install public-choice
pnpm add public-choice
yarn add public-choice
bun add public-choice
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.9 |
| Published | 2020-05-09 |
| First published | 2019-03-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 9 |
| Unpacked size | 178.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | bahrus |

## Links

- npm: https://www.npmjs.com/package/public-choice
- Repository: https://github.com/bahrus/public-choice
- Homepage: https://github.com/bahrus/public-choice#readme
- Issues: https://github.com/bahrus/public-choice/issues
- npm.io page: https://npm.io/package/public-choice

## Dependencies (9)

- [if-diff](https://npm.io/package/if-diff.md) 0.0.44
- [slot-bot](https://npm.io/package/slot-bot.md) 0.0.5
- [xtal-sip](https://npm.io/package/xtal-sip.md) 0.0.97
- [p-et-alia](https://npm.io/package/p-et-alia.md) 0.0.76
- [purr-sist](https://npm.io/package/purr-sist.md) 0.0.62
- [trans-render](https://npm.io/package/trans-render.md) 0.0.172
- [xtal-element](https://npm.io/package/xtal-element.md) 0.0.125
- [xtal-frappe-chart](https://npm.io/package/xtal-frappe-chart.md) 0.0.70
- [xtal-radio-group-md](https://npm.io/package/xtal-radio-group-md.md) 0.0.6

## Recent versions

- 0.0.9 (latest) — 2020-05-09
- 0.0.8 — 2020-05-09
- 0.0.7 — 2019-04-20
- 0.0.6 — 2019-04-20
- 0.0.5 — 2019-04-20
- 0.0.4 — 2019-04-15
- 0.0.3 — 2019-04-14
- 0.0.2 — 2019-04-14
- 0.0.1 — 2019-04-14
- 0.0.0 — 2019-03-17

## README

[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/public-choice)

<a href="https://nodei.co/npm/public-choice/"><img src="https://nodei.co/npm/public-choice.png"></a>

<img src="https://badgen.net/bundlephobia/minzip/public-choice">

# public-choice Web Component

Preliminary public polling web component.  Do Not Use In Production.

[Demo](https://bahrus.github.io/public-choice/)

Markup for Demo:

```html
  <div>
      <public-choice-jsonblob guid="951c3b69-3e16-4f62-915b-ba3ca33a8e78">
        <span slot="question">Rational choice theories of politics</span>
        <datalist slot="options">
          <option value="Assumes that individuals are naturally irrational and so should not be given a choice in important political decisions"></option>
          <option value="State that only humans are rational and therefore non-humans are not appropriate subjects of politics"></option>
          <option value="Assume that political parties and voters have the utility-maximizing characteristics of actors in the economic sphere"></option>
          <option value="Assume that voters tend to vote for parties based on the charisma of the party leader"></option>
        </datalist>
      </public-choice-jsonblob>

      <public-choice-jsonblob guid="0a924568-fcb7-4387-ae85-91a6fa41f789">
          <span slot="question">'If Option 1 is ranked higher than Option 2, then removing Option 3 should not alter the relative rankings of Options 1 and 2', this is the definition of which property of fairness?</span>
          <datalist slot="options">
            <option value="IIA"></option>
            <option value="Pareto Efficiency"></option>
            <option value="No Dictators"></option>
            <option value="None of These"></option>
            <option value="All of these could be correct."></option>
          </datalist>        
      </public-choice-jsonblob>


      <public-choice-jsonblob guid="d1b5f984-9216-4076-8ba1-36ad54edbc07">
          <span slot="question">Three sets of voters pick between three candidates: 
            <p>30% prefer A to B to C</p>
            <p>40% prefer B to C to A</p>
            <p>30% prefer C to A to B</p>
            <p>Suppose only the first choice counts, so B wins the election.</p>
            <p>However, if C was removed, A would win the election 60% to 40%.</p>
            <p>This is an example of violation of which principle?</p>
          </span>
          <datalist slot="options">
            <option value="Unanimity"></option>
            <option value="No Dicators"></option>
            <option value="IIA"></option>
          </datalist>        
      </public-choice-jsonblob>
```

---
_Source: https://npm.io/package/public-choice · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
