murphyslemon / Raspberry_Pi_Server

International Sensor Development Project: This project is a voting system that uses a raspberry pi server and multiple voting devices. The system is easy, secure, scalable, and supports anonymous and registered voting. This repository focuses on the Raspberry Pi server.
0 stars 3 forks source link

calculateVoteStatistics function #15

Open MagnusLii opened 10 months ago

MagnusLii commented 10 months ago

Vote Result Analytics Function

Goal

This function receives a JSON object detailing vote distribution retrieved from a database query. Its purpose is to process this data, calculate various statistics, and compile them into a structured JSON object.

Statistics to calculate

Various Majorities

Arguments

Function Name: calculateVoteStatistics