Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add in function to get a list of species present on a project site #1

Open
alieyres opened this issue Aug 4, 2022 · 3 comments
Open

Comments

@alieyres
Copy link
Collaborator

alieyres commented Aug 4, 2022

Is your feature request related to a problem? Please describe.
In order to calculate biodiversity impacts of a project. You first need to know which species are present in the region.

Describe the solution you'd like
Create a list of species present at a site based on intersection of species ranges with project boundary)
Inputs: IUCN range maps (polygons) , Project polygons , path?
Outputs: List of species IDs (and binomials?)

Describe alternatives you've considered
NA

Additional context
NA

@alieyres
Copy link
Collaborator Author

alieyres commented Aug 8, 2022

@mdales I've had a go at writing a function for this. Would be good if we can check it over together on Tuesday
It's at /home/ae491/ali_aoh/projectSpeciesList.py OR
https://gist.github.com/alieyres/a828ac00a9d0153c5c309b2bed6ed23d

Key questions:

  1. Does it actually do the right thing (Ali to check)
  • When I do it in QGIS I got 123 species but with my method I got 131 (Some seemed to fail in QGIS)
  • I made a mini version of ranges which had 3 species I knew are in Gola and 3 species that I know are not in gola. This gave the right results so I feel reasonably confident it works...
  1. What format/ class does the data need to be to be useful for the next steps.

@mdales
Copy link
Collaborator

mdales commented Aug 9, 2022

Ultimately the way you get confidence in this is by writing test functions. You can see that I've started doing this for the area calculation here:

https://github.com/carboncredits/persistence-calculator/blob/main/tests/test_calculate.py#L18-L42

Basically you can see that I'm creating a 1x1 pixel area that has very specific elevation, area, etc. and checking that the area calculated has the right data in it. It's all very artificial, but it's tests like this that give us confidence in the code we have.

@mdales
Copy link
Collaborator

mdales commented Aug 9, 2022

In answer to point 3, I suspect to answer that we'll need to map out the "pipeline" for an end to end 4C persistence calculator. Perhaps an aim for early next week is to have that in place?

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

No branches or pull requests

2 participants