User:RobLa/Electowidget: Difference between revisions

Noting that I'm focusing most of his my on ABIF, and mostly on the Python tooling. However, there is a start on a Lua-based implementation over on the "Module:ABIF" page
(Noting that I'm focusing most of his my on ABIF, and mostly on the Python tooling. However, there is a start on a Lua-based implementation over on the "Module:ABIF" page)
 
(6 intermediate revisions by 2 users not shown)
Line 1:
'''Electowidget''' is a PHPPHP4 library (initally a plugin for MediaWiki) designed to make it possible to conduct Internet polls and elections using many different [[wikipedia:Voting systems|voting systems]], including the [[Wikipedia:Schulze method|Schulze method]], [[Wikipedia:Instant runoff voting|Instant runoff voting]], [[Wikipedia:Approval voting|Approval voting]], and even plain old [[Wikipedia:Plurality|Plurality]]. It also assists in explaining different election methods by providing an easy way of tallying example elections, and comparing the results as computed by different elections. The modular design allows for plugging in new election tallying methods, different ballot designs, and different ballot formats.
 
It was in active development in 2005, with additional development as late as 2009, but has not seen updates since then. <s>View the Bitbucket source code repository</s> to get the code. (NOTE: Atlassian removed Mercurial support, but thankfully the SoftwareHeritage.org folks created an archive: [https://bitbucket-archive.softwareheritage.org/projects/ro/robla/electowidget.html softwareheritage.org: robla/electowidget]).
Latest news:
* August 9, 2009 - Electowidget back from the dead! I've installed a new version on this wiki, which is now simply a tag extension to standard MediaWiki (no patching required). No official release yet, but there's a new [http://bitbucket.org/robla/electowidget/ Bitbucket repository] with some updated code in it.
* October 29, 2005 - Initial Electowidget release! (version 0.1.0)
 
If development resumes, information will be available at https://electorama.com/electowidget
{{Electowidget Infopanel}}
 
== AboutExample ==
Here's an example of a call to the very, very crude Electowidget Lua module
 
<code>
Electowidget is a plugin for MediaWiki designed to make it possible to conduct Internet polls and elections using many different [[wikipedia:Voting systems|voting systems]], including the [[Wikipedia:Schulze method|Schulze method]], [[Wikipedia:Instant runoff voting|Instant runoff voting]], [[Wikipedia:Approval voting|Approval voting]], and even plain old [[Wikipedia:Plurality|Plurality]].
<nowiki>
{{#invoke:Electowidget Infopanel|get_data}}
</nowiki>
</code>
 
The beginning of the results should look something like the following:
Electowidget isn't designed for secure public elections. It's primarily designed as a tool to help election theorists provide comparative examples of how a given result will be tabulated comparing multiple different systems. The initial version supported conducting polls, but this functionality is now dormant. Development in the near term will be focused toward making it easier to input full datasets from election data and/or developing theoretical election results.
<code>
{
"version":"0.1",
"candidates":
{
"Kiss":
{
"display_name":"Bob Kiss (Progressive)"
},
"Montroll":
{
"display_name":"Andy Montroll (Democrat)"
},
</code>
...and then continue to spill all of the JSON from [[2009 Burlington, Vermont Mayoral Election data]].
 
As of 2023-09-12, [[User:RobLa]] is focusing most of his work on [[ABIF]], and mostly on the Python tooling. However, there is a start on a Lua-based implementation of ABIF over on the "[[Module:ABIF]]" page.
Currently, a [http://json.org JSON-based format] is the only supported format.
 
== Using [[Category:Electowidget ==]]
 
Now that you've been warned, the easiest thing to do is to copy the configuration for [[#Example elections|an example election]], and create a new page with your election on it. Since election configurations are just wiki pages, the same editing instructions for editing a wiki apply here, except that the syntax is substantially different.
 
A somewhat complete reference for the election configuration pages is here:
* [[Electowidget Configuration Reference]]
 
An [http://robla.net/2005/jsonwidget/example.php online Javascript-based editor] for election configurations is available. When you have everything configured like you want it, view "edit source", copy the text, and save it inside of <nowiki><electowidget></electowidget></nowiki> tags.
 
== Example elections ==
 
* [[2003 Debian Project Leader Election]]
* [[Electowidget/2000 U.S. Presidential Election example]]
 
== MediaWiki administrator information ==
 
You can install Electowidget as a plugin on a MediaWiki 1.5.1 installation. As October, 2005, it requires a small patch to the base installation to work, however, and probably won't work with earlier versions of MediaWiki, nor will it work with the development version of MediaWiki (due to some refactoring that has happened). It also mostly requires PHP 4. It runs under PHP 5, but there's a known issue or two.
 
* [http://electorama.com/2005/electowidget/downloads/electowidget-0.1.0.tar.gz Download the tarball to get started]
* [[Electowidget Installation]] - step-by-step installation instructions for Electowiki (assumes you already have [http://mediawiki.org MediaWiki] installed.
 
== Developer information ==
 
Electowidget is programmed in PHP. It's currently pretty tightly bound to MediaWiki, but an effort is already underway to generalize it, and make it possible to plug into any PHP application that provides the necessary support infrastructure.
 
[http://electorama.com/2005/electowidget/classdocs/ Doxygen documentation] is available.
 
== Screenshots ==
 
No screenshots yet, but the [[#Example elections|example elections]] are web accessible live demos.
 
== License ==
 
Electowidget is licensed under a BSD-style open source license. See LICENSE.txt in the distribution for the exact text of the license.
 
== Help ==
 
To either get help, or to offer help, here's a list of community resources:
 
* [http://bugs.electorama.com Bug tracking]
* [http://lists.electorama.com/listinfo.cgi/electowidget-discuss-electorama.com Mailing list]
* IRC: irc.freenode.net:6667 #electowidget
 
{{bsd-licensed}}[[Category:Electowidget]]