A PySpark utility package for sales data analysis and visualization
Project description
GeekSales
A powerful PySpark utility package for sales data analysis and visualization.
Features
- Create and configure Spark sessions with optimized settings
- Calculate sales metrics and aggregations
- Generate comprehensive sales dashboards
- Create various sales visualizations:
- Sales by region
- Customer order distribution
- Sales trends over time
- Top products by sales
Installation
pip install geeksales
Usage
from geeksales import spark_utils
# Create a Spark session
spark = spark_utils.create_spark_session("Sales Analysis")
# Load your sales data
df = spark.read.csv("sales_data.csv", header=True, inferSchema=True)
# Add sales metrics
df_with_metrics = spark_utils.add_sales_metrics(df)
# Generate sales summary
summary = spark_utils.get_sales_summary(df_with_metrics)
# Create visualizations
spark_utils.plot_sales_by_region(df_with_metrics)
spark_utils.plot_customer_order_distribution(df_with_metrics)
spark_utils.plot_sales_trend(df_with_metrics)
spark_utils.plot_product_sales(df_with_metrics)
# Create a complete dashboard
dashboard = spark_utils.create_sales_dashboard(df_with_metrics)
Requirements
- Python 3.7 or higher
- PySpark 3.0 or higher
- Matplotlib 3.0 or higher
- Seaborn 0.11 or higher
- Pandas 1.0 or higher
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
geeksales-0.1.0.tar.gz
(4.3 kB
view details)
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 geeksales-0.1.0.tar.gz.
File metadata
- Download URL: geeksales-0.1.0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ba00286c201063d6c0f4101056e8f039da6105a8128c0069d593608510c23d1
|
|
| MD5 |
a4567d685ebbd2cb322f40f7b628559a
|
|
| BLAKE2b-256 |
67ce561df550acc0a0bf8a89b0ada6293b0c08a5ec115e6a7ffe82a6f3593a3a
|
File details
Details for the file geeksales-0.1.0-py3-none-any.whl.
File metadata
- Download URL: geeksales-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c3df12ea3752c46e50bce09ae7ec42f581c01503340e4aa58320cedc8456c0f
|
|
| MD5 |
bf6d3065e32f6a4ca00afd2d23c22983
|
|
| BLAKE2b-256 |
22b94cdc17f7d945c8fd9cb589c5a543ff5108779ad71e20b8f6fe95d3f48147
|