Skip to content

JeanPousset/granulometric-analysis

Repository files navigation

Granulometric analysis web app


Info

Web application for Granulometric (grain-size) data analysis developped during an IRMAR internship

Author :

Jean Pousset (4th year Applied Maths INSA Rennes) contact : pousset.jean1@gmail.com

DON'T HESITATE TO CONTACT ME FOR HELP / MORE EXPLANATIONS

Guidance:

Data proveiders :

Code writer of the algorithme that produced the BLASSO results : Clément Elvira (IETR / SCEE)

Online use

You can easily use the online application via the link: https://granulometric-analysis.streamlit.app/ . When you get to the page, you may have to click on the alert to restart the server. It automatically shuts down when there has been no access for 48 hours.

You can also do some modifications on the app and run it locally on your computer. In that case follow the instruction in Local Installation. Then you can modify the app in the streamlit_app.py script and lunch it by following the instruction of Local use.

Local Installation

1) Download or clone the entire repository locally

2) Check if Python is already installed :

First check if you have python (version 3.0 or greater) and pip installed in your computer. Open a terminal window in your computer and run the following commands :

Logo Windows Windows :
py --version
py -m pip --version
Logo Linux Linux /  MacOS :
python3 --version
pip --version

If an error is prompted this probably means that Python is not installed. We are going to fix that.

3) Install Python if necessary

The procedure for python'installation depends on you operating system (OS). Click on your operating system to use the correct instructions.

Logo Windows Windows :

Go on official python installation page and follow instruction to install it on Windows.

Logo Linux Linux :

Open a terminal and run the following commands:

sudo apt update
sudo apt install python3
sudo apt install python3-pip
 MacOS (with homebrew) :

If needed, you can find the installation documentation for homebrew here.
Open a terminal and run the following commands:

brew update
brew install python

If you don't want to use homebrew you can install python directly on the official python installation page

4) Install Streamlit and other package

Select your operating system (OS) and follow the isntructions.

Logo Windows Windows :

First you need to install streamlit (package to lunch web application in python). Open a terminal window and run this command :

py -m pip install streamlit

If the installation is successfull, the following command returns information about streamlit installation.

py -m streamlit --version

Then install the other packages/dependancies with the following command (in the project repertory):

py -m pip install -r requirements.txt

You can also do it manually with :

py -m pip install numpy
py -m pip install pandas
py -m pip install scikit-learn
py -m pip install plotly
py -m pip install openpyxl
Logo Linux Linux /  MacOS :

First you need to install streamlit (package to lunch web application in python). Open a terminal window and run this command :

pip install streamlit

If it doesn't work try with pip3 instead of pip. Verify the installation with :

streamlit --version

Then install the other packages/dependancies with the following command (in the project repertory):

pip install -r requirements.txt

You can also do it manually with :

pip install numpy
pip install pandas
pip install scikit-learn
pip install plotly
pip install openpyxl

Locale use

Open a terminal and navigate to where you put or cloned the repository. (i.e type cd {directory_path} where directory_path is the path). When you type ls (or dir in Windows) in the terminal you should have the following list prompted :

$ ls  # or `dir` if you are on Windows 
> B-LASSO_imports       README.md             ref_curves_&_exemples
> Data                  backends              requirements.txt
> IRMAR_report          exports               streamlit_app.py

To run the app you just have to write the following command depending on your OS :

Logo Windows Windows :
py -m streamlit run streamlit_app.py
Logo Linux Linux /  MacOS :
streamlit run streamlit_app.pys

If you lunch streamlit for the first time you might have a message prompted in your terminal that invite you to give your email to get help. Just ignore it. After a few seconds you should see this message on your terminal.

> You can now view your Streamlit app in your browser.
> 
>   Local URL: http://localhost:8501
>   Network URL: http://192.168.1.18:8501
>   External URL: http://90.49.34.45:8501

It means the app has been successfully lunched. To access it please open the Local URL (in my case http://localhost:8501) in your browser.

To close the application go back to your terminal. You can simply close your terminal or press : ctrl+C

Note

If you encounter any error/problem please contact me at : pousset.jean1@gmail.com

About

Web application for Granulometric (grain-size) data analysis

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages