Skip to content

Bugfix/examples#262

Draft
tgrandje wants to merge 19 commits intomasterfrom
bugfix/examples
Draft

Bugfix/examples#262
tgrandje wants to merge 19 commits intomasterfrom
bugfix/examples

Conversation

@tgrandje
Copy link
Copy Markdown
Collaborator

@tgrandje tgrandje commented Mar 6, 2025

Update some examples from the doc:

  • remove geofrdataframes and transform
  • update code with latest numpy/pandas versions
  • remove outdated references to API keys
  • use pynsee to download latest IRIS dataset with built-in functions
  • refacto a bit of code (mostly due to the IRIS dataset's slight changes)
  • update some colormaps to be more "colorblind-friendly" and switch to monochrome palettes when deemed appropriate*

* that being said: de gustibus and so on... : so if you disagree with the new palettes, no problem for setting it back!

@tgrandje tgrandje requested a review from tfardet March 6, 2025 22:43
@tfardet
Copy link
Copy Markdown
Collaborator

tfardet commented Mar 19, 2026

sorry, I realize I forgot to review this, ping me if you have time to go back on it and fix the conflicts

@tgrandje
Copy link
Copy Markdown
Collaborator Author

Sure, I started checking this yesterday and some fields names were altered by IGN since I made this PR. I'll let you know when this is ok.

@tgrandje
Copy link
Copy Markdown
Collaborator Author

Just resolved the conflicts. I'll double check other (unconflicted) examples are fully working

@tgrandje
Copy link
Copy Markdown
Collaborator Author

Note that deaths/births example raises (on cell #5) :

[...]\Lib\site-packages\pandas\core\indexes\base.py:7588: FutureWarning: Dtype inference on a pandas object (Series, Index, ExtensionArray) is deprecated. The Index constructor will keep the original dtype in the future. Call infer_objects on the result to get the old behavior.

@tgrandje
Copy link
Copy Markdown
Collaborator Author

tgrandje commented Mar 24, 2026

Ah, population_pyramid is ko without any prospect of resetting it right away. It used localdata API which has been discontinued (you are supposed to switch to MELODI). I think we should dig up #213.

I also think the test failure is due to localdata's / melody discrepancy.

@tfardet what do you think we do on this? Tag the example as obsolete and keep it in the doc for the moment ? Maybe even double check and disable the failing test on test_pynsee_localdata ?

EDIT

The missing dataset on localdata seems to be the census dataset (dataset_version being GEOlatestRPlatest). I think the newest dataset is that one...

@tfardet
Copy link
Copy Markdown
Collaborator

tfardet commented Mar 24, 2026

Ah, population_pyramid is ko without any prospect of resetting it right away. It used localdata API which has been discontinued (you are supposed to switch to MELODI). I think we should dig up #213.

yes, this definitely needs doing but I've no idea when I might be able to work on this... unlikely any time before the end of the year.

I also think the test failure is due to localdata's / melody discrepancy.

by test failure, you mean test_get_local_data_latest or a test related to population_pyramid?

@tfardet what do you think we do on this? Tag the example as obsolete and keep it in the doc for the moment ? Maybe even double check and disable the failing test on test_pynsee_localdata ?

Tagging the example as obsolete sounds good until we can work on updating it.
No idea about the failing localdata tests, though...

The missing dataset on localdata seems to be the census dataset (dataset_version being GEOlatestRPlatest). I think the newest dataset is that one...

Yeah, this looks weird, probably the people from INSEE removed some data because this should not be able to fail.
That said, GEOlatestRPlatest is also probably a situation where we should use Melodi...

@tgrandje
Copy link
Copy Markdown
Collaborator Author

Note: don't merge that one yet, I still need to either fix/tag pyramid.

@tgrandje tgrandje marked this pull request as draft March 26, 2026 07:40
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.

2 participants