Use the Titanic dataset for every README example - #76
Merged
Merged
Conversation
PR #68 rewrote the quickstart around the people aboard the Titanic but left the six numbered examples below it on their original data: Cat1/Cat2/Cat3, invented vehicle sales numbers, and Factory A/B/C. So the page introduced a real dataset and then dropped it, and a reader following along had to reorient five times. The Titanic figures turned out to cover every example, including the two with awkward requirements: - Auto-sizing needs values small enough to be block counts. The children aboard, 6, 24 and 79, total 109, so one block really is one child. - The DataFrame example needs a genuine two-dimensional table. The inquiry table is already class by group, so first/second/third class against men/women/children drops straight in, and sizing each subplot by its own class shows that third class carried more people than first and second combined. The prose now quotes the real scaled numbers, 7, 6, 16 and 20 for the value-scaling example, taken from the rendered chart rather than computed by hand. Source, added once at the end of the section: the British Board of Trade inquiry of 1912.
With four categories on a 5 x 10 grid, snake reversed every other row, so Second class came out as two disconnected patches, top right and then the right of row two, with Third class running underneath on the left. Reading left to right you met gold, teal, terracotta, then teal again, which looks like the data is out of order rather than like a deliberate layout. Measured it rather than judging by eye: reading the grid top left to bottom right, the snake version broke the four categories into seven colour runs. Without it, each category is a single run and the chart reads in legend order, the way a line of text does. starting_location="NW" and vertical=True stay, so the example still shows a layout that differs from the default. block_arranging_style keeps its paragraph and its link, since it is worth knowing about; it just no longer has to make this particular chart confusing to earn its place.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#68 rewrote the quickstart around the people aboard the Titanic, but left the six numbered examples below it on their original data:
Cat1/Cat2/Cat3, invented vehicle sales figures, andFactory A/B/C. The page introduced a real dataset and then dropped it, so a reader following along had to reorient five times.I checked whether the Titanic figures could carry all six before assuming they could. They can.
Two were the awkward ones:
Auto-sizing needs absolute block numbers, and 2,201 is far too many. The children aboard total 109, so
rows=5gives a 22-column chart where one block really is one child, which is a better illustration of the feature than the placeholder numbers were.The DataFrame example needs a genuine table rather than a list. The inquiry's own table is already class by group, so first/second/third class against men/women/children drops straight in. Sizing each subplot by its own class turns out to carry the point on its own: third class is visibly wider than first and second together.
On accuracy
The prose quotes the real scaled numbers. The old text said "automatically scaled to 24, 23 and 3"; the new text says 7, 6, 16 and 20, which I read off the rendered chart rather than computing by hand. I also confirmed the per-class men/women/children rows sum to the class totals used elsewhere on the page (325, 285, 706), so the two cuts of the dataset agree with each other.
The source is cited once at the end of the section rather than repeated under every chart.
Verified
examples/generate_plots.py, so the code shown is the code that produced the image above it.Not included
demo.ipynbstill uses the old data. It is a separate artifact with its own outputs committed, and rebuilding it is a much larger diff, so it is better as its own change.Update: example 3 reordered
The styling example used
block_arranging_style='snake', and with four categories on a 5x10 grid that reads badly. Snake reverses every other row, so Second class came out as two disconnected patches — top right, then the right of row two — with Third class running underneath on the left. Scanning left to right you met gold, teal, terracotta, then teal again, which looks like the data is out of order rather than a deliberate layout.Measured rather than judged by eye. Reading the grid top-left to bottom-right and counting colour runs, where four categories ideally give four runs:
NW, vertical=True, snake(before)NW, vertical=True(after)NW, vertical=False, snakeNW, vertical=False, normalEach category is now a single continuous run and the chart reads in legend order, the way a line of text does.
starting_location="NW"andvertical=Truestay, so the example still shows a layout that differs from the default — verified the first block moves from bottom-left to top-left.block_arranging_stylekeeps its own paragraph and its documentation link, so it stays discoverable without having to make this particular chart confusing to earn its place. The section heading no longer promises "Arranging Style".