Funnelius is an open-source Python library designed to analyze and visualize complex, non-linear user funnels.
Project description
Funnelius
Funnelius is an open-source Python library designed to analyze and visualize complex, non-linear user funnels. Built with Pandas, Graphviz, and Streamlit, it allows data scientists and analysts to easily track user journeys, calculate conversion rates, and identify bottlenecks.
Prerequisites
Please ensure that you have graphviz and streamlit installed and these tools can be accessed in your Operation System's path.
Features
- Visualize Complex Funnels: Analyze and visualize non-linear, conditional funnels where the next step depends on previous answers or actions.
- Conversion Rate Calculation: Automatically calculates conversion rates at each step of the funnel.
- Bottleneck Detection: Uses conditional formatting to highlight steps with low conversion rates or long durations.
- Comparison: Ability to compare two funnel data and see differences.
- Answe Contribution: Show answer contribution of every step and changes.
- Filter and Clean Data: Filters out noise and irrelevant data to focus on the most important routes.
- Interactive UI: Powered by Streamlit, providing a GUI to tweak parameters and see changes instantly.
- PDF Export: Generate funnel visualizations as PDF files.
Installation
To install Funnelius, use pip:
pip install funnelius
Usage
Here’s a quick example of how to use Funnelius to analyze a funnel:
1- Import the library:
import funnelius as fa
2- Prepare your funnel data in a pandas DataFrame with these structure:
| user_id | action | action_start | answer |
|---|---|---|---|
| 1 | 1st question | 2025-04-10 12:04:15.00 | Yes |
| 1 | 2nd question | 2025-04-10 12:05:17.00 | No |
Render the funnel analysis:
fa.render(df)
Funnelius will process this data and generate a visual funnel with conversion rates, drop-off percentages, and more.
You can pass this optional parameters to fine tune funnel:
-
df: The input pandas DataFrame containing user journey data with user_id, action, and action_start columns.
-
title: Filename (without extension) used for exporting the final funnel visualization as a PDF.
-
first_actions_filter: Optional list of starting actions to include; filters out journeys that begin with other actions.
-
goals: List of actions that define successful completion of the journey (used to calculate conversion).
-
max_path_num: Maximum number of unique user paths to display in the graph; 0 means show all.
-
show_drop: Boolean flag to include or exclude drop-off data from the funnel visualization.
-
show_answer: Boolean flag to shw/hide answer contribution in the funnel visualization.
-
comparison_df: The DataFrame containing user journey data that you want to use to compare.
-
gradient: A list with length 3 that contains gradient color data in RGB points. for example: gradient = [[255,205,205],[255,255,255],[205,255,205]]
-
gradient_metric: Metric that should be used for condtional formatting. Possible values are: users, conversion-rate, percent-of-total and duration-median
-
metrics: A list of metrics to show in every step. Possible values are: users, conversion-rate, percent-of-total and duration-median
Streamlit GUI
The library includes an interactive user interface powered by Streamlit, allowing you to visualize and tweak funnel parameters.
Run the app python:
import funnelius as f
f.interactive()
screenshot:
Contributing
I welcome contributions! Feel free to open issues, or submit pull requests to help improve Funnelius.
License
Funnelius is open-source software licensed under the Apache 2.0 License.
Contact
For questions or feedback, please reach out via GitHub Issues.
Happy funnel analyzing! 🚀
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file funnelius-0.0.6.tar.gz.
File metadata
- Download URL: funnelius-0.0.6.tar.gz
- Upload date:
- Size: 19.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2df815f05a36fe8adf504c2d0a02994a33f749bb37380b8a7a14777d5245ccbc
|
|
| MD5 |
9e79f539616a60f98695062f3213073e
|
|
| BLAKE2b-256 |
83141683c6adf3fa05a4bcee83e491daac34abb978b6d371a41219632ae3d351
|
File details
Details for the file funnelius-0.0.6-py3-none-any.whl.
File metadata
- Download URL: funnelius-0.0.6-py3-none-any.whl
- Upload date:
- Size: 20.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6974a50586e6078b1167a7e3b2b6878deed96f22a9f274fe946c2006dcbb08b3
|
|
| MD5 |
04efd683304028346f8e7072fec2ec59
|
|
| BLAKE2b-256 |
26b67cf4d204c0f179be5820e1b9562e7c605006924177f2851e9f2ae97c67af
|