Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Term Entry - .create_distplot() - Plotly #5618

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

danitellini
Copy link
Contributor

@danitellini danitellini commented Nov 13, 2024

Description

Summary of Changes:

Topic: Plotly - Figure_Factory - .create_distplot() function
Files created: docs/content/plotly/concepts/figure-factory/terms/create-distplot/create-distplot.md
Files added: 'media/distplot-example.pngDescription: Created a **Term Entry** for the.create_distplot()function of thefigure_factory` module.

Teaching is a great way to practice and learn.

Issue Solved

Closes #4723

Type of Change

  • Adding a new entry
  • Editing an existing entry (fixing a typo, bug, issues, etc)
  • Updating the documentation

Checklist

  • All writings are my own.
  • My entry follows the Codecademy Docs style guide.
  • My changes generate no new warnings.
  • I have performed a self-review of my own writing and code.
  • I have checked my entry and corrected any misspellings.
  • I have made corresponding changes to the documentation if needed.
  • I have confirmed my changes are not being pushed from my forked main branch.
  • I have confirmed that I'm pushing from a new branch named after the changes I'm making.
  • I have linked any issues that are relevant to this PR in the Issues Solved section.

@danitellini danitellini changed the title Term entry create distplot Term Entry - .create_distplot() - Plotly Nov 13, 2024
@mamtawardhani mamtawardhani self-assigned this Nov 14, 2024
@mamtawardhani mamtawardhani added new entry New entry or entries status: under review Issue or PR is currently being reviewed plotly Python:Plotly entries labels Nov 14, 2024
Copy link
Collaborator

@mamtawardhani mamtawardhani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @danitellini, thank you for contributing to Codecademy Docs, the entry is nicely written! 😄

I've suggested a few changes, could you please review and modify those at your earliest convenience? Thank you! 😃

Comment on lines +1 to +18
---
Title: '`.create_distplot()`'
Description: '`.create_distplot()` creates interactive distribution plots combining histogram and KDE curves, ideal for visualization and comparing data distributions.'
Subjects:
- 'Data Science'
- 'Data Visualization'
Tags:
- 'Histograms'
- 'NumPy'
- 'Plotly'
- 'Python'
- 'Seaborn'
CatalogContent:
- 'learn-python-3'
- 'paths/computer-science'
- 'paths/data-science'
- 'paths/data-science-foundations'
---
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
---
Title: '`.create_distplot()`'
Description: '`.create_distplot()` creates interactive distribution plots combining histogram and KDE curves, ideal for visualization and comparing data distributions.'
Subjects:
- 'Data Science'
- 'Data Visualization'
Tags:
- 'Histograms'
- 'NumPy'
- 'Plotly'
- 'Python'
- 'Seaborn'
CatalogContent:
- 'learn-python-3'
- 'paths/computer-science'
- 'paths/data-science'
- 'paths/data-science-foundations'
---
---
Title: '.create_distplot()'
Description: 'Creates a distribution plot (histogram with a kernel density estimate) for visualizing the data distribution.'
Subjects:
- 'Data Science'
- 'Data Visualization'
Tags:
- 'Histograms'
- 'NumPy'
- 'Plotly'
- 'Python'
- 'Seaborn'
CatalogContent:
- 'learn-python-3'
- 'paths/computer-science'
---

- 'paths/data-science-foundations'
---

The **`.create_distplot()`** function is part of Plotly's `.figure_factory` module. It is used to create distribution plots, which are visual representations that combine histograms and kernel density estimates (KDE) to display the distribution of a dataset.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The **`.create_distplot()`** function is part of Plotly's `.figure_factory` module. It is used to create distribution plots, which are visual representations that combine histograms and kernel density estimates (KDE) to display the distribution of a dataset.
The **`.create_distplot()`** function is part of Plotly's [`figure_factory`](https://www.codecademy.com/resources/docs/plotly/figure-factory) module. It creates distribution plots that combine histograms and kernel density estimates (KDE) to visually represent a dataset's distribution.

Comment on lines +25 to +28
fig = figure_factory.create_distplot(
hist_data,
group_labels,
(...)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
fig = figure_factory.create_distplot(
hist_data,
group_labels,
(...)
fig = figure_factory.create_distplot( hist_data, group_labels, ...)

Comment on lines +31 to +32
- `hist_data`: Contains numerical data for each dataset, entered as a list of lists or arrays.
- `group_labels`: List of strings corresponding to each dataset in `hist_data`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `hist_data`: Contains numerical data for each dataset, entered as a list of lists or arrays.
- `group_labels`: List of strings corresponding to each dataset in `hist_data`.
- `hist_data`: A list of datasets to plot. Each dataset is represented as a separate group in the distribution plot.
- `group_labels`: List of strings corresponding to each dataset in `hist_data`. These labels are used to distinguish the different groups in the plot.


This is a basic distribution plot that generates 2 datasets with normal distributions using default settings:

```python
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```python
```py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Term Entry] Python Plotly - Figure_factory .create_distplot()
2 participants