Interactive Streamlit app for exploring perfume ratings and popularity (votes) across brands.
The app loads a pre-cleaned dataset from Data/all_brands_clean.csv, lets you select a brand, and visualizes that brand’s fragrances on a Plotly scatter chart (rating vs. votes on a log scale). Clicking a point opens the fragrance’s Fragrantica page (when url is present in the dataset).
- Landing page (
app.py) with navigation to the explorer - Explorer page (
pages/fragrance_explorer.py) with:- Brand selector with first-letter filtering
- Summary metrics (count of fragrances, share with rating ≥ 4.0)
- Interactive Plotly chart (rating vs votes)
- Click-to-open fragrance URL (if available)
.
├── app.py
├── pages/
│ └── fragrance_explorer.py
├── src/
│ ├── __init__.py
│ ├── data.py
│ ├── plots.py
│ └── widgets.py
└── Data/
└── all_brands_clean.csv
- Python 3.10+ (recommended)
Main Python dependencies used by the code:
streamlitpandasplotly
Create and activate a virtual environment, then install dependencies.
If you have a requirements.txt in your environment, prefer using it:
pip install -r requirements.txtOtherwise install the core dependencies directly:
pip install streamlit pandas plotlyThe app expects the dataset at:
Data/all_brands_clean.csv
Notes:
- The
Data/directory is ignored by git (.gitignorecontainsData/). - Required columns (enforced in
src/data.py):brand,name,rating,votes - Optional column:
url(enables click-to-open from the chart)
If any required columns are missing, the app will show a friendly message (it will treat the dataset as empty).
From the project root:
streamlit run app.pyThen use the sidebar navigation (or the button on the landing page) to open Fragrance Explorer.
- Data loading is cached via
st.cache_datainsrc/data.py. - The explorer resolves the dataset path relative to the project root, so running via
streamlit run app.pyfrom the root directory is the expected workflow.