Skip to main content

RainCloud

RainCloud is a Python package that provides a convenient function to create raincloud plots; a combination of density plots, box plots, and strip plots that provide a detailed visualization of data distributions.

Features

  • Raincloud Plots: Visualize the distribution of your data in a detailed and intuitive way.
  • Customization Options: Easily customize the plot with options for titles, labels, colors, orientation, and more.
  • Thunder Mode: Connect the means of each group with a point plot to emphasize differences between groups.

Installation

You can install the RainCloud package directly from PyPI:

pip install RainCloud

Usage

Here's how you can use the create_raincloud_plot function:

import pandas as pd
from RainCloud.raincloud import create_raincloud_plot

# Generate example data
np.random.seed(42)
num_entries = 1000 

cities = ['Tunis', 'Sousse', 'Sfax', 'Gabes', 'Djerba']
temperatures = np.random.normal(loc=20, scale=10, size=num_entries)

city_offsets = {
    'Tunis': 10,
    'Sousse': 5,
    'Sfax': 0,
    'Gabes': -5,
    'Djerba': -1
}

temperatures = np.random.normal(loc=70, scale=15, size=num_entries)
city_choices = np.random.choice(cities, num_entries)

offsets = np.array([city_offsets[city] for city in city_choices])
adjusted_temperatures = temperatures + offsets

df = pd.DataFrame({
    'city': city_choices,
    'temp': adjusted_temperatures
})

# Create a raincloud plot
create_raincloud_plot(
    df=df, 
    x='city', 
    y='temp', 
    title='Raincloud Plot of Temperatures by City', 
    xlabel='City', 
    ylabel='Temperature (°F)', 
    thunder=True
)

Parameters

  • df: DataFrame containing the data to be plotted.
  • x: Column name for the x-axis data.
  • y: Column name for the y-axis data.
  • title: Title of the plot.
  • xlabel: Label for the x-axis (defaults to the x column name).
  • ylabel: Label for the y-axis (defaults to the y column name).
  • palette: Color palette for the plot (default: 'Set2').
  • alpha: Transparency level for the plot elements (default: 0.6).
  • orient: Orientation of the plot, 'h' for horizontal or 'v' for vertical (default: 'h').
  • figsize: Size of the figure (default: (10, 10)).
  • thunder: Whether to connect the means of each group with a point plot (default: False).

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

Contact

GitHub LinkedIn Twitter Instagram Email Personal Web Page

Metadata

Release files for RainCloud 0.1.0.post1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for RainCloud 0.1.0.post1
File Size Uploaded
RainCloud-0.1.0.post1.tar.gz 3.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for RainCloud 0.1.0.post1
File Interpreter ABI Platform
RainCloud-0.1.0.post1-py3-none-any.whl Python 3 none any Details

Total release size: 7.7 kB

Release files / RainCloud-0.1.0.post1.tar.gz

Download URL RainCloud-0.1.0.post1.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a75742f71a4944d5a0a5102b434eee524a1c8ad39cada2ca7848ab18509662d8
BLAKE2b-256 checksum
How to use checksums
d58622c379eab88b2a517b788da95bc6d36893d36ec68a718dd1e5606f757f54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.4

Release files / RainCloud-0.1.0.post1-py3-none-any.whl

Download URL RainCloud-0.1.0.post1-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3cdf23c01e4a73db2ae175298cb5ba822a24cdc29effa016be3c1bf56103a962
BLAKE2b-256 checksum
How to use checksums
41f609cee056360986031fdb9667b21da2c170c6ce428f528cbc0b5229b219c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.4

Release history Release notifications | RSS feed

This release

0.1.0.post1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page