All Projects → JhumanJ → laravel-model-stats

JhumanJ / laravel-model-stats

Licence: MIT License
Model statistics dashboard for your Laravel Application

Programming Languages

Vue
7211 projects
PHP
23972 projects - #3 most used programming language
javascript
184084 projects - #8 most used programming language
Blade
752 projects
SCSS
7915 projects

Projects that are alternatives of or similar to laravel-model-stats

mlbgameday
Multi-core processing of 'Gameday' data from Major League Baseball Advanced Media. Additional tools to parallelize large data sets and write them to a database.
Stars: ✭ 37 (-80.11%)
Mutual labels:  statistics
mongodb-info
MongoDB Info - command line tool to get stats.
Stars: ✭ 13 (-93.01%)
Mutual labels:  statistics
Euler
The open-source computational framework for the Swift language
Stars: ✭ 37 (-80.11%)
Mutual labels:  statistics
ethz cs summaries
Summaries / Cheat Sheets created at ETH Zurich BsC Computer Science & MsC Data Science
Stars: ✭ 67 (-63.98%)
Mutual labels:  statistics
interactive-simple-linear-regression
A PureScript, browser-based implementation of simple linear regression.
Stars: ✭ 15 (-91.94%)
Mutual labels:  statistics
Data-Analyst-Nanodegree
Kai Sheng Teh - Udacity Data Analyst Nanodegree
Stars: ✭ 42 (-77.42%)
Mutual labels:  statistics
mathlion
Mathlion is an advanced math plugin for Kibana's Timelion
Stars: ✭ 77 (-58.6%)
Mutual labels:  statistics
BayesHMM
Full Bayesian Inference for Hidden Markov Models
Stars: ✭ 35 (-81.18%)
Mutual labels:  statistics
confstat-bot
Statistics for telegram groups
Stars: ✭ 26 (-86.02%)
Mutual labels:  statistics
enum-eloquent
Enum attribute casting for Eloquent models
Stars: ✭ 60 (-67.74%)
Mutual labels:  eloquent-models
PyImpetus
PyImpetus is a Markov Blanket based feature subset selection algorithm that considers features both separately and together as a group in order to provide not just the best set of features but also the best combination of features
Stars: ✭ 83 (-55.38%)
Mutual labels:  statistics
parcours-r
Valise pédagogique pour la formation à R
Stars: ✭ 25 (-86.56%)
Mutual labels:  statistics
quarantine-bot
WhatsApp bot powered by Twilio API to get through the quarantine. Latest COVID19 statistics, world news, inspirational quotes and cat photos.
Stars: ✭ 24 (-87.1%)
Mutual labels:  statistics
analytics reading list
a collection of books, articles, and tutorials to learn and apply analytics
Stars: ✭ 16 (-91.4%)
Mutual labels:  statistics
ThunderStats
This addon adds awesome statistics to your beloved Thunderbird!
Stars: ✭ 34 (-81.72%)
Mutual labels:  statistics
Algorithms
Free hands-on course with the implementation (in Python) and description of several computational, mathematical and statistical algorithms.
Stars: ✭ 117 (-37.1%)
Mutual labels:  statistics
karan36k.github.io
These are all the articles and pages I have in my data science website. I try to transcribe all I learn and post regularly. Please visit and feel free to email me for suggestions.
Stars: ✭ 22 (-88.17%)
Mutual labels:  statistics
d3-boxplot
d3js box plot plugin
Stars: ✭ 21 (-88.71%)
Mutual labels:  statistics
laravel-autonumber
Laravel package to create autonumber for Eloquent model
Stars: ✭ 26 (-86.02%)
Mutual labels:  eloquent-models
AMIDD
Introduction to Applied Mathematics and Informatics in Drug Discovery (AMIDD)
Stars: ✭ 13 (-93.01%)
Mutual labels:  statistics

Laravel Model Stats

Model statistics dashboard for your Laravel Application

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads


Screenshot of sample dashboard

This Laravel packages gives you a statistic dashboard for you Laravel application. Think of it as a light version of Grafana, but built-in your Laravel application, and much easier to get started with. No code knowledge is required to use Laravel Model Stats, users can do everything from the web interface. It also optionally supports custom-code widgets, allowing you to define your widget data with code, just like you would do with tinker.


Installation

You can install the package via composer:

composer require jhumanj/laravel-model-stats

You can install the package and run the migrations with:

php artisan model-stats:install
php artisan migrate

Available No-Code Widgets

Different type of widgets (daily count, daily average, etc.) are available. When creating a widget, you choose a Model, an aggregation type and the column(s) for the graph. You can then resize and move the widgets around on your dashboard.

The aggregation types currently available:

  • Daily Count (Number of records per day during selected period).
  • Cumulated Daily Count (Cumulated Total record count during selected period).
  • Period Total (Number of new records during selected period).
  • Group By Count (Count per group for a given column during selected period).
  • ... (more to come soon)

For each widget type, date can be any column: created_at,updated_at,custom_date.

Custom Code Widgetn

You can also use custom code widgets, allowing you to define your widget data with code, just like you would do with tinker.

Your code must define a $result variable containing the data to return to the choosen chart. You can use the $dateFrom and $dateTo variable.

Example custom code for a bar chart:

$result = [
    'a' => 10,
    'b' => 20
];

Note that for safety reasons, your code won't be allowed to perform any write operations on the database. You can only use the code to query data and transform it in-memory. Even if disabling write operations makes things sage, remote code execution is always a very risky operation. Be sure that your dashboard authorization is properly configured. You may want to disable custom code widgets by setting the MODEL_STATS_CUSTOM_CODE env variable to false.

Dashboard Authorization

The ModelStats dashboard may be accessed at the /stats route. By default, you will only be able to access this dashboard in the local environment. Within your app/Providers/ModelStatsServiceProvider.php file, there is an authorization gate definition. This authorization gate controls access to ModelStats in non-local environments. You are free to modify this gate as needed to restrict access to your ModelStats installation:

/**
 * Register the ModelStats gate.
 *
 * This gate determines who can access ModelStats in non-local environments.
 *
 * @return void
 */
protected function gate()
{
    Gate::define('viewModelStats', function ($user) {
        return in_array($user->email, [
            '[email protected]',
        ]);
    });
}

Upgrading

Be sure to re-publish the front-end assets when upgrading ModelStats:

php artisan model-stats:publish

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits (Contributors)

Inspiration

License

The MIT License (MIT). Please see License File for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].