Statistics Dart package for easy and efficient data manipulation with many built-in functions and units.

Overview

statistics

pub package Null Safety Codecov CI GitHub Tag New Commits Last Commits Pull Requests Code size License

Statistics package for easy and efficient data manipulation with many built-in mathematical functions and units.

Usage

Numeric extension:

import 'package:statistics/statistics.dart';

void main() {
  var ns = [10, 20.0, 30];
  print('ns: $ns');

  var mean = ns.mean;
  print('mean: $mean');

  var sdv = ns.standardDeviation;
  print('sdv: $sdv');

  var squares = ns.square;
  print('squares: $squares');
}

OUTPUT:

ns: [10, 20.0, 30]
mean: 20.0
sdv: 8.16496580927726
squares: [100.0, 400.0, 900.0]

Statistics

import 'package:statistics/statistics.dart';

void main() {
  var ns = [10, 20.0, 30];
  var statistics = ns.statistics;

  print('Statistics.max: ${ statistics.max }');
  print('Statistics.min: ${ statistics.min }');
  print('Statistics.mean: ${ statistics.mean }');
  print('Statistics.standardDeviation: ${ statistics.standardDeviation }');
  print('Statistics.sum: ${ statistics.sum }');
  print('Statistics.center: ${ statistics.center }');
  print('Statistics.squaresSum: ${ statistics.squaresSum }');

  print('Statistics: $statistics');
}

OUTPUT:

Statistics.max: 30
Statistics.min: 10
Statistics.mean: 20.0
Statistics.standardDeviation: 21.602468994692867
Statistics.sum: 60.0
Statistics.center: 20.0
Statistics.squaresSum: 1400.0
Statistics: {~20 +-21.6024 [10..(20)..30] #3.0}

CSV

import 'package:statistics/statistics.dart';

void main() {
  var categories = <String, List<double?>>{
    'a': [10.0, 20.0, null],
    'b': [100.0, 200.0, 300.0]
  };

  var csv = categories.generateCSV();
  print(csv);
}

OUTPUT:

#,a,b
1,10.0,100.0
2,20.0,200.0
3,0.0,300.0

Source

The official source code is hosted @ GitHub:

Features and bugs

Please file feature requests and bugs at the issue tracker.

Contribution

Any help from the open-source community is always welcome and needed:

  • Found an issue?
    • Please fill a bug report with details.
  • Wish a feature?
    • Open a feature request with use cases.
  • Are you using and liking the project?
    • Promote the project: create an article, do a post or make a donation.
  • Are you a developer?
    • Fix a bug and send a pull request.
    • Implement a new feature.
    • Improve the Unit Tests.
  • Have you already helped in any way?
    • Many thanks from me, the contributors and everybody that uses this project!

If you donate 1 hour of your time, you can contribute a lot, because others will do the same, just be part and start with your 1 hour.

Author

Graciliano M. Passos: gmpassos@GitHub.

License

Apache License - Version 2.0

You might also like...

ThemeX is an easy theme manipulation. Only inform primary color and the ThemeX generate all color combination palette for you

ThemeX is an easy theme manipulation. Only inform primary color and the ThemeX generate all color combination palette for you

ThemeX is an easy theme manipulation basied on Material Design. Only inform primary color and the ThemeX generate all color combination palette for yo

Jan 31, 2022

A view for video based on video_player and provides many basic functions.

flutter_video_view A view for video based on video_player and provides many basic functions. Getting Started This project is a starting point for a Fl

Dec 9, 2022

A fast and space efficient library to deal with data in Dart, Flutter and the web.

Dart Data Dart Data is a fast and space efficient library to deal with data in Dart, Flutter and the web. As of today this mostly includes data struct

Nov 4, 2022

A comprehensive, cross-platform path manipulation library for Dart.

A comprehensive, cross-platform path manipulation library for Dart. The path package provides common operations for manipulating paths: joining, split

Dec 29, 2022

A dart package which provides a lot of helpers functions for easy development.

more_functions A dart package which provides a lot of helpers functions for easy development. Installation Add this to your packages pubspec.yaml file

Dec 5, 2021

A coronavirus statistics, news and general information app with a symptom checker. 🚀

A coronavirus statistics, news and general information app with a symptom checker. 🚀

Corona Spectator Corona Spectator is a coronavirus statistics and news app that has real time global COVID-19 stats. It includes useful tips to help g

Oct 8, 2022

A simple mobile app developed with Flutter to visualize Covid19 statistics 🦠

A simple mobile app developed with Flutter to visualize Covid19 statistics 🦠

Covid19Stats It's a simple app to visualize charts and statistics about the current Covid-19 emergency. It's developed using Flutter and some plugins

Nov 23, 2022

A covid statistics app made with Flutter SDK

A covid statistics app made with Flutter SDK

Covid Tracker - A covid-19 statistics app Covid Tracker is an app made with Flutter framework to provide worldwide information related to Covid-19 pan

Dec 1, 2022

An online query App for COVID-19 statistics developed by Flutter was used.

An online query App for COVID-19 statistics developed by Flutter was used.

如果产生其他依赖无法编译的问题,可以尝试将pubspec.yaml中的dependencies中的所有依赖的"^"去掉,重新编译尝试。 nCoV_2019 获取新肺炎实时动态App,支持Android和IOS。 Log 2020.09.03 - 适配Flutter 1.20 2020.07.04 -

Dec 11, 2022

Rocket is a parsing framework for parsing binary data structures using efficient parsing algorithms

rocket Version 0.1.10 (BETA) Rocket is a parsing framework for parsing binary data structures using efficient parsing algorithms. Breaking change: The

Dec 5, 2021

AI Library to create efficient Artificial Neural Networks. Computation uses SIMD (Single Instruction Multiple Data) to improve performance.

eneural_net eNeural.net / Dart is an AI Library for efficient Artificial Neural Networks. The library is portable (native, JS/Web, Flutter) and the co

Dec 29, 2022

An efficient and easy CA-Client interaction flutter project

An efficient and easy CA-Client interaction flutter project

Cloud Accounting An efficient and easy CA-Client interaction flutter project This is an application for a CA to interact with its clients. Clients can

Dec 18, 2022

A library for YAML manipulation with comment and whitespace preservation.

Yaml Editor A library for YAML manipulation while preserving comments. Usage A simple usage example: import 'package:yaml_edit/yaml_edit.dart'; void

Dec 26, 2022

A set of commands for coverage info files manipulation.

Coverage Utils A set of commands for coverage info files manipulation. Installing $ dart pub global activate

Oct 9, 2022

A set of commands for coverage tracefiles manipulation.

Coverage Utils A set of commands for coverage info files manipulation. Installing $ dart pub global activate --source git https://github.com/mrverdant

Oct 9, 2022

Dart package responsible to provide the basic resources to Lambda Functions with Clean Dart

AWS Lambda Core This package is responsible to provide the basic resources to all services; Usage pubspec.yaml dependencies: aws_lambda_core: laste

Dec 2, 2021

UIWidget is a Unity Package which helps developers to create, debug and deploy efficient, cross-platform Apps.

UIWidget is a Unity Package which helps developers to create, debug and deploy efficient, cross-platform Apps.

⚠️ The main repository of UIWidgets has been moved to https://github.com/Unity-Technologies/com.unity.uiwidgets. Please visit the new site if you have

Dec 27, 2022

A simple and efficient FFT implementation for Dart

A simple and efficient FFT implementation for Dart

fftea A simple and efficient Fast Fourier Transform (FFT) library. FFT converts a time domain signal to the frequency domain, and back again. This is

Nov 18, 2022

Dartness is a progressive dart framework for building efficient and scalable server-side applications

Dartness is a framework for building efficient, scalable dart server-side applications. It provides an easy and quick way to develop modern standalone server.

Dec 12, 2022
Comments
  • Standard deviation computation incorrect?

    Standard deviation computation incorrect?

    It looks like the standard deviation calculation is not yielding the correct results. Using the test data of [10, 20, 30], the STD comes out to ≈8.16, but the test has a value of ≈21.[...], which looks wrong.

    Looking at the code, it seems like the library only computes the square root of the squared sum divided by the number of elements, whereas it should be the square root of the variance of the sample, the sum of the squared differences from the mean value.

    opened by zmeggyesi 2
  • standardDeviation of an image is not correct ?

    standardDeviation of an image is not correct ?

    Hello, I want to calculate the standardDeviation of an image, but there is a difference between the calculation by python and the lib flutter. code python: fm = cv2.Laplacian(gray, cv2.CV_64F).var() Do you have any ideals for the problem ?

    investigating 
    opened by minhnhatvdl 1
Releases(1.0.24)
Owner
Graciliano Monteiro Passos
Graciliano Monteiro Passos
Create an AutoComplete TextField to search JSON data based on suggestions in Flutter.

Flutter Tutorial - AutoComplete TextField & AutoComplete Search Create an AutoComplete TextField to search JSON data based on suggestions in Flutter.

Johannes Milke 32 Oct 23, 2022
A Flutter package to parse text and make them into linkified text widget

?? Flutter Parsed text A Flutter package to parse text and extract parts using predefined types like url, phone and email and also supports Regex. Usa

Fayeed Pawaskar 213 Dec 27, 2022
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

Shahzad Akram 219 Jan 5, 2023
A Flutter package provides some implementations of TextInputFormatter that format input with pre-defined patterns

A Flutter package provides some implementations of TextInputFormatter that format input with pre-defined patterns

HungHD 192 Dec 31, 2022
Soft and gentle rich text editing for Flutter applications.

About Zefyr Soft and gentle rich text editing for Flutter applications. You are viewing early dev preview version of this package which is no longer a

Memspace 2.2k Jan 8, 2023
Soft and gentle rich text editing for Flutter applications

Soft and gentle rich text editing for Flutter applications. Zefyrka is a fork of Zefyr package with the following improvements: support Flutter 2.0 op

null 85 Dec 21, 2022
Rich Text renderer that parses Contentful Rich Text JSON object and returns a renderable Flutter widget

Contentful Rich Text Renderer for Flutter Rich Text renderer that parses Contentful Rich Text field JSON output and produces a Flutter Widget tree tha

Kumanu 45 Nov 10, 2022
Text Editor in Flutter for Android and iOS to help free write WYSIWYG HTML code

Flutter Summernote Text Editor in Flutter for Android and iOS to help free write WYSIWYG HTML code based on Summernote 0.8.18 javascript wrapper. NOTI

Chandra Abdul Fattah 41 Sep 12, 2022
Data Migrator - provide a universal translator for data by being portable, diverse, and efficient in migrating and converting data across discrete schemas

Data Migrator - provide a universal translator for data by being portable, diverse, and efficient in migrating and converting data across discrete schemas

Tanner Meade 77 Jan 2, 2023
Plaso Connect is an application which acts as a one-stop solution where the people requiring blood plasma/oxygen can directly find and contact the donors and healthcare units as per their requirements

PLASO CONNECT - The Lifeline A one-stop platform for COVID relief resources -- Connecting patients with Plasma donors and oxygen suppliers. Built for

Niloy Sikdar 11 Oct 28, 2022