Skip to content

Africapolis notebooks#564

Merged
mpho-sadiki merged 13 commits intomainfrom
Africapolis
Jan 31, 2025
Merged

Africapolis notebooks#564
mpho-sadiki merged 13 commits intomainfrom
Africapolis

Conversation

@mpho-sadiki
Copy link
Contributor

Proposed changes

Notebooks associated with the Africapolis dataset

Checklist (replace [ ] with [x] to check off)

  • Remove any unused Python packages from Load packages
  • Remove any unused/empty code cells
  • Remove any guidance cells (e.g. General advice)
  • Ensure that all code cells follow the PEP8 standard for code. The jupyterlab_code_formatter tool can be used to format code cells to a consistent style: select each code cell, then click Edit and then one of the Apply X Formatter options (YAPF or Black are recommended)
  • Include relevant tags in the first notebook cell and re-use tags if possible
  • Ensure appropriate colour schemes have been used to maximise accessibility for vision impairment. Test your images or learn more with Coblis or TPGI
  • Clear all outputs, run notebook from start to finish, and save the notebook in the state where all cells have been sequentially evaluated

Closes issues (optional)

  • Closes Issue #000

@mickwelli
Copy link
Contributor

Very nice examples @mpho-sadiki and looks like a neat dataset. Some notes from my review:

Datasets notebook:

  • In Background, suggest re-wording or removing "We will keep looking for new ways, new tools and new data to improve Africapolis and its relevance for the African continent and invite you to contribute."
  • agglomerations_2020.plot(color=agglomerations_2020['color_HEX']) what do the colours represent? Could a legend be added if applicable, or colours be explained in text?
  • In addition to the urban and green cover bar chart, do you think it would be informative to add a land cover map from the product used? The bar chart made me wonder what land cover class(es) made up the remaining area as urban and green only add up to about 60-70%.

RWE notebook:

  • I was unable to run this notebook in the 16GB Sandbox without the kernel crashing. It will need to be rectified and re-run before merging. A couple of ideas: split up the loop cells to perform a calculation in one loop & cell, and plot with another loop & cell, and/or plot only a sample of years.
  • I really like the GeoMAD clipped plot, I've changed the col_wrap argument (I think). See what you think.
  • Do you think it would be worth fixing the vmin and vmax values for the NDVI plots so each can be compared with the same colour scale?

Copy link
Contributor

@mickwelli mickwelli left a comment

Choose a reason for hiding this comment

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

Thanks @mpho-sadiki, all runs well my side

@mickwelli
Copy link
Contributor

@mpho-sadiki the urban green space notebook runs well, nice code, especially loops! A few things:

  • Could the default location be listed in the markdown somewhere?
  • Considering the recent review of the notebooks repo, I think some of the cells here have quite a lot of code. I think it's good that you've added markdown within the cells using # to explain what code chunks are doing, but I think it would be good to break up the cells a bit and add some more markdown, especially where you have complex processes like defining functions for process_histogram_per_year()
  • Could a conclusion markdown cell be added explaining how to interpret the final plot output and giving recommendations for future use of this workflow - i.e. bring it back to the application of the analysis.

@mickwelli
Copy link
Contributor

Another point just occurred to me, we'll need to add any new notebooks to the landing page(s)

Copy link
Contributor

@lisarebelo lisarebelo left a comment

Choose a reason for hiding this comment

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

Thank you Mpho - this is a significant piece of work and the notebooks are very well thought through and presented. They have great markdown and descriptions, and the examples are well laid out.

Minor grammatical edits:
In urban tree extent notebook under description edit to "demonstrates"
In urban green space notebook - Check capitalisation in heading of urban green space notebook and data in titles with dataFrame

@mpho-sadiki mpho-sadiki merged commit 9f656b7 into main Jan 31, 2025
1 check passed
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