Dart package to rank proposals according to Majority Judgment, using a score-based algorithm for performance and scalability

Overview

Majority Judgment for Dart

MIT Release Build Status Code Quality LoC Discord Chat

This Dart package helps to resolve polls using Majority Judgment.

Features

  • Efficient Majority Judgment algorithm, scales well to billions of participants
  • Configure whether to favor adhesion or contestation (default)
  • Balance proposal tallies using a static default grade or the median grade1
  • Room for Central Judgment and Usual Judgment
  • Unit-tested (run dart test)

Get started

import 'package:majority_judgment/majority_judgment.dart';

void main() {
    
      final pollTally = PollTally([
        [1, 2, 4, 2, 1], // Proposal A, from "worst" grade to "best" grade
        [1, 2, 4, 1, 2], // Proposal B
        [3, 1, 3, 1, 2], // Proposal C
        [1, 2, 4, 2, 1], // Proposal D (equal to A)
      ]);
      final mj = MajorityJudgmentResolver();
      final result = mj.resolve(pollTally);

      print(result.proposalsResults.map((ProposalResult p) => p.rank));
      //> (2, 1, 4, 2)

      print(result.sortedProposalsResults.map((ProposalResult p) => p.index));
      //> (1, 0, 3, 2)
    
}

Contribute

Usual git flow: clone, tinker, request a merge.

Authors

This package was made by MieuxVoter, a french nonprofit.

Footnotes

  1. TODO, see #1 ; it's a good first issue if you want to contribute

You might also like...

The FlexGrid control provides a powerful and quickly way to display data in a tabular format. It is including that frozened column/row,loading more, high performance and better experience in TabBarView/PageView.

The FlexGrid control provides a powerful and quickly way to display data in a tabular format. It is including that frozened column/row,loading more, high performance and better experience in TabBarView/PageView.

flex_grid Language: English| 中文简体 The FlexGrid control provides a powerful and quickly way to display data in a tabular format. It is including that f

Nov 8, 2022

Comparing performance of sqlite3 and sqflite

FlutterSqliteComparison Comparing the performance of two different sqlite libraries by INSERTing 10000 rows one-by-one and then SELECTing all rows in

Jan 7, 2022

Immich - High performance self-hosted photo and video backup solution

Immich - High performance self-hosted photo and video backup solution

Self-hosted photo and video backup solution directly from your mobile phone.

Jan 8, 2023

Health Performance Monitor ui design in a neomorphism style.

Health Performance Monitor ui design in a neomorphism style.

Health Performance Monitor UI Health Performance Monitor ui design in a neomorphism effect built using Flutter. Show some ❤️ and star the repo, it mak

Jun 17, 2022

A Dart FFI package to send 💬 toasts on Windows. Written in C++, based on WinToast.

A Dart FFI package to send 💬 toasts on Windows. Written in C++, based on WinToast.

desktoasts A Dart package to send native 💬 toasts on Windows. Installation For Flutter dependencies: ... desktoasts: ^0.0.2 For Dart CLI here Sup

Mar 7, 2022

🌍 Full-stack travel app using Flutter, Dart and Geolocation service. Map updates 🗺 along with map markers based on location filters 📌

🌍 Full-stack travel app using Flutter, Dart and Geolocation service. Map updates 🗺 along with map markers based on location filters 📌

Tripscape 🌴 Built With Frontend Flutter Dart Backend & Libraries Geolocator Google Maps Flutter Provider API Places API Google Maps API Places Autoco

Nov 23, 2022

A Flutter Package to render Mathematics, Physics and Chemistry Equations based on LaTeX

A Flutter Package to render Mathematics, Physics and Chemistry Equations based on LaTeX

flutter_tex Contents About Demo Video Screenshots How to use? Android iOS Web Examples Quick Example TeXView Document TeXView Markdown TeXView Quiz Te

Jan 5, 2023

A Flutter Package to render Mathematics, Physics and Chemistry Equations based on LaTeX

A Flutter Package to render Mathematics, Physics and Chemistry Equations based on LaTeX

flutter_tex Contents About Demo Video Screenshots How to use? Android iOS Web Examples Quick Example TeXView Document TeXView Markdown TeXView Quiz Te

Jan 5, 2023

Flutter package to determine whether to prompt a user to rate your app based on a given criteria.

should_review This package helps determine if a user should be prompted to rate your app. The behavior of this package was inspired by the stackoverfl

Sep 10, 2022
Releases(0.2.0)
  • 0.2.0(Oct 14, 2021)

  • 0.1.3(Oct 13, 2021)

  • 0.1.0(Oct 13, 2021)

    Rank proposals according to majority judgment, and balance tallies with a default static grade.

    Handles billions of judges and thousands of proposals. If you need more, the current algorithm can be parallelized.

    Enjoy, friends !

    Onwards !

    Source code(tar.gz)
    Source code(zip)
Owner
Mieux Voter
L'association pour la promotion du jugement majoritaire
Mieux Voter
A simple easy to use Flutter DApp , which keeps a track of all your day to day transactions by using Ethereum blockchain in the background which in turn increases your credit score.

Sahayog A simple easy to use Flutter DApp , which keeps a track of all your day to day transactions by using Ethereum blockchain in the background whi

Utkarsh Agarwal 15 May 21, 2022
A simple flutter app to manage the score in a match of darts

DartCounter An application to keep track of a Dart match It is currently made for Windows-only use, but you can build it for any Platform if you want,

bafto 1 Jun 1, 2022
Algorithm Toolbox is an Android app for C++, Python and DART algorithms. It shows the codes as well as its explanation with various examples.

AlgoKing Algorithm Toolbox is an Android app for C++, Python and DART algorithms. It shows the codes as well as its explanation with various examples.

Hash Studios 5 Sep 13, 2022
A Flutter ListView that implicitly calculates the changes between two lists using the MyersDiff algorithm and animates between them for you

A Flutter ListView that implicitly calculates the changes between two lists using the MyersDiff algorithm and animates between them for you

Vojtech Pavlovsky 2 Dec 16, 2022
Algorithm for choosing the best seats in a cinema. Made in dart.

Buy movie tickets algorithm This dart project contains an algorithm to choose the better seats on the cinema. Also contains a bot to buy movie tickets

Chris Chávez 1 Dec 2, 2021
AES 256 GCM encryption algorithm in Dart

aes-256-gcm-dart AES 256 GCM encryption algorithm in Dart Use var text = 'SOME D

Swifty 8 Nov 11, 2022
Dart library with stack blur algorithm for RGBA images

stack_blur The Dart library for blurring images with the Stack blur algorithm. T

Artёm IG 3 Nov 19, 2022
Movie Lib is a mobile application where you can find the movies of your interest. This app provides a collection of movies of different languages according to your interest.

Movie Lib Movie Lib is a mobile application where you can find the movies of your interest. This app provides a collection of movies of different lang

Abhijith Kp 6 Sep 28, 2021
A flutter app that brings the weather according to the entered location name

An application that brings the weather according to the entered location name and displays it dynamically on the screen. It also includes weekly forec

AYDIN EREN KESKİN 0 Oct 31, 2021
A app made with Flutter, which allows user to lookup time of any major city in the world. The UI also changes its background according to the time.

first_flutter_project A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you st

Laksh Mittal 0 Oct 31, 2021