A simple web app for checking if the numbers in specified column in user submitted delimited text file are following the Benford's Law. This is a play project, created for the purpose of learning Python library Flask, Java Script framework Vue3 and some basic web-dev concepts.
For now, the app can draw the bar plot of distribution of first significant digits and present the results of Chi-squared Goodness of Fit Test. It handles only upload form related errors, does not handel the errors emerging from the contents of an analyzed file yet.
Required: docker-compose and npm
To run the app you need to:
-
clone the repository
-
checkout to this branch
-
run the following commands from the top directory of cloned repository:
docker-compose up -d
if you want to see logs, you can run:
docker-compode logs -f
-
open new terminal and run:
cd client npm run serve
-
open http://127.0.0.1:8080/ in your browser.
Let's check whether the distance of the 300 brightest stars from Earth (in light years) follows the Beanford's Law.
-
Download the data.
There are TSV and CSV files in the test directory containing relevant data:
- https://github.com/lltw/simple-blc/blob/main/tests/test_flat_files/300_brightest_stars.tsv
- https://github.com/lltw/simple-blc/blob/main/tests/test_flat_files/300_brightest_stars.csv
Download one of them. The source of the data is http://www.atlasoftheuniverse.com/stars.html.
-
Start the app following the intructions above (Getting started) and go to http://127.0.0.1:8080/ in your browser.
-
Upload the file:
- select the downloaded file
- set column number to 13
- set delimiter to comma or tab (depending on which file you downloaded)
- set the header presence field to 'yes'
- click 'Submit'!
If you are curious what else to check, the 11th column - The Hipparcos parallax of the star - is a good pick. For more info go to http://www.atlasoftheuniverse.com/stars.html or see the info file: