Skip to content

Conversation

@dsmmcken
Copy link
Contributor

@dsmmcken dsmmcken commented Sep 2, 2025

  • Add pivot table generator
  • Converts stocks to use the merge(empty table, time table) trick instead of replayer (shaves about 0.5sec off init time, and lowers overall initial memory)
  • Fix type errors through file
  • Add documentation page for the example data
  • Fix ui_table test not using ticking=False

Note: Because of how random was used stocks random string will change (triggering e2e test), and ticking false has changed from 36,000 rows to a more reasonable 3,000 rows.

@dsmmcken dsmmcken requested review from Copilot and jnumainville and removed request for Copilot September 2, 2025 13:40
@dsmmcken dsmmcken requested a review from Copilot September 2, 2025 13:40

This comment was marked as outdated.

@github-actions
Copy link

github-actions bot commented Sep 2, 2025

plotly-express docs preview (Available for 14 days)

Returns a fish market sales dataset designed for pivot table examples. Ticks every second,
is random but deterministic, and contains lots of categorical data for pivoting.
Columns:
Copy link
Collaborator

Choose a reason for hiding this comment

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

I really like the column breakdown, that's something that we should add to all of the example datasets as really what is important is the columns in the table, not the arguments. Probably beyond the scope of this PR though.
Going further, and absolutely beyond the scope of this, I wonder if we could develop some sort of standardization with "column descriptions" for functions that return tables (and maybe take them if certain columns are expected?). Something might already exist for this but I couldn't find anything quickly. I think it's a missed opportunity thought because then we could build tooling around it for docs, tooltips, etc.

Copy link
Contributor Author

@dsmmcken dsmmcken Sep 3, 2025

Choose a reason for hiding this comment

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

there was a concept of table column descriptions, that would show up in the tooltips, but I don't think it was ever fully built out. Added docs for all the tables.

Copy link
Member

Choose a reason for hiding this comment

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

The JS API has column descriptions wired up, and the UI displays the description in the tooltip when you hover over the header.
Only time that description actually gets used right now I think is if it's a preview column (the description will say something like "Preview of ...").
Not wired up in Column on the engine side though.

@github-actions
Copy link

github-actions bot commented Sep 3, 2025

plotly-express docs preview (Available for 14 days)

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new pivot table example generator called fish_market and makes performance improvements to the stocks data generator. It also standardizes documentation formatting across data generators.

  • Adds fish_market() generator with comprehensive categorical data suitable for pivot table examples
  • Replaces stocks table replayer with merge(empty_table, time_table) approach for better performance
  • Standardizes documentation format across all data generators with consistent column descriptions

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
data_generators.py Adds fish_market generator, optimizes stocks performance, fixes type conversions, standardizes docstrings
__init__.py Exports new fish_market function
Documentation snapshots Snapshot files for all data generators in documentation
sidebar.json Adds example data documentation to sidebar
example-data.md New documentation page describing all available example datasets

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions
Copy link

github-actions bot commented Sep 3, 2025

plotly-express docs preview (Available for 14 days)

jnumainville
jnumainville previously approved these changes Sep 4, 2025
@github-actions
Copy link

github-actions bot commented Sep 4, 2025

plotly-express docs preview (Available for 14 days)

@github-actions
Copy link

github-actions bot commented Sep 5, 2025

plotly-express docs preview (Available for 14 days)

@github-actions
Copy link

github-actions bot commented Sep 5, 2025

plotly-express docs preview (Available for 14 days)

Copy link
Collaborator

Choose a reason for hiding this comment

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

What is happening here? Unstable test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That shouldn't have been in this pr, it looks like a timeout result, but also weird that it passed in CI.

@github-actions
Copy link

github-actions bot commented Sep 9, 2025

plotly-express docs preview (Available for 14 days)

@dsmmcken dsmmcken merged commit 2ff9325 into main Sep 10, 2025
17 checks passed
@dsmmcken dsmmcken deleted the dmckenzie_pivot branch September 10, 2025 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants