Skip to content

docs: Fr/sequential example#156

Merged
rodriguesfred merged 13 commits into
devfrom
fr/sequential-example
May 15, 2026
Merged

docs: Fr/sequential example#156
rodriguesfred merged 13 commits into
devfrom
fr/sequential-example

Conversation

@rodriguesfred
Copy link
Copy Markdown
Collaborator

Description

Some examples of sequential data

Summary

Some examples of sequential data

Changes Made

  • Example of map using discrete sequential scale as per the Analysis function website.
  • Example using heatmaps. Had to find a gov dataset may not be the best example.

Related Issues

Copy link
Copy Markdown

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 sequential colour palette usage examples to the Plotly cookbook, addressing issue #154. It introduces two new chart types: a choropleth map of England showing visual impairment certification rates (using geopandas and a government open data API), and a heatmap of domestic energy price indices (using a local .xlsx file).

Changes:

  • New choropleth map section using the sequential palette with discrete quintile categories and a custom legend
  • New heatmap section using the sequential palette applied as a continuous colorscale

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/afcharts/cookbook/03-plotly-usage.qmd
Comment thread src/afcharts/cookbook/03-plotly-usage.qmd Outdated
Comment thread src/afcharts/cookbook/03-plotly-usage.qmd Outdated
Comment thread src/afcharts/cookbook/03-plotly-usage.qmd
Comment thread src/afcharts/cookbook/03-plotly-usage.qmd Outdated
Comment thread src/afcharts/cookbook/03-plotly-usage.qmd Outdated
Comment thread src/afcharts/cookbook/03-plotly-usage.qmd Outdated
Comment thread src/afcharts/cookbook/03-plotly-usage.qmd
Comment thread src/afcharts/cookbook/03-plotly-usage.qmd Outdated
@nickhenden
Copy link
Copy Markdown
Collaborator

Copilot did a pretty good job! I think I agree with all of it's comments.

Could you address these comments @rodriguesfred then I'll take a second look.

@rodriguesfred
Copy link
Copy Markdown
Collaborator Author

rodriguesfred commented Mar 5, 2026

ready to review again @nickhenden

Copy link
Copy Markdown
Collaborator

@nickhenden nickhenden left a comment

Choose a reason for hiding this comment

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

I've not had time to review the code but I spotted some issues when trying to run it.

Comment thread pyproject.toml Outdated
Comment thread src/afcharts/cookbook/03-plotly-usage.qmd Outdated
Comment thread src/afcharts/cookbook/03-plotly-usage.qmd Outdated
Base automatically changed from five-colour-palette to dev May 1, 2026 15:48
@rodriguesfred rodriguesfred requested a review from nickhenden May 5, 2026 11:30
Copy link
Copy Markdown
Collaborator

@nickhenden nickhenden left a comment

Choose a reason for hiding this comment

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

Sorry for the massive delay in reviewing. The charts look great :)

A lot of my suggestions are about reducing code. I appreciate there's a lot of steps needed to reproduce the map, but I don't want to put people off with tons of code if it's not necessary for demonstrating the package and/or common techniques.

Comment thread src/afcharts/cookbook/03-plotly-usage.qmd Outdated
Comment thread src/afcharts/cookbook/03-plotly-usage.qmd Outdated
Comment thread src/afcharts/cookbook/03-plotly-usage.qmd Outdated
Comment thread src/afcharts/cookbook/03-plotly-usage.qmd Outdated
Comment thread src/afcharts/cookbook/03-plotly-usage.qmd Outdated
Comment thread src/afcharts/cookbook/03-plotly-usage.qmd Outdated
Comment thread src/afcharts/cookbook/03-plotly-usage.qmd Outdated
Comment thread src/afcharts/cookbook/03-plotly-usage.qmd Outdated
Comment thread src/afcharts/cookbook/03-plotly-usage.qmd Outdated
Comment thread src/afcharts/cookbook/03-plotly-usage.qmd Outdated
@rodriguesfred
Copy link
Copy Markdown
Collaborator Author

@nickhenden I think I addressed all the comments (maybe) got hard to track LOL

@rodriguesfred rodriguesfred requested a review from nickhenden May 8, 2026 10:14
Copy link
Copy Markdown
Collaborator

@nickhenden nickhenden left a comment

Choose a reason for hiding this comment

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

Thanks Fred, looks like you've resolved everything :) Three minor tweaks then I think we're good to go

Comment thread src/afcharts/cookbook/03-plotly-usage.qmd
Comment thread src/afcharts/cookbook/03-plotly-usage.qmd Outdated
Comment thread src/afcharts/cookbook/03-plotly-usage.qmd
Copy link
Copy Markdown
Collaborator

@nickhenden nickhenden left a comment

Choose a reason for hiding this comment

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

Thanks! Approved :)

@rodriguesfred rodriguesfred merged commit b91de13 into dev May 15, 2026
4 checks passed
@rodriguesfred rodriguesfred deleted the fr/sequential-example branch May 15, 2026 13:28
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