As in the previous years, I’ve created a small analysis of the CNC Wien project, to highlight notable observations at city, country, continent and global levels, as well as making it easy to see which taxa were uniquely observed by each individual.
The code (unfortunately without much documentation so far) is available here https://github.com/barnabywalters/inaturalist-project-stats if you want to try running it yourself. I’m also happy to run the analysis for you, just let me know :)
Is there a way to get the export file for a project when you are not the admin of the project (or not even a member of the project)?
Edit: nevermind i figured it out. Either use the address https://www.inaturalist.org/observations/export?projects%5B%5D= + the project name or in the export page itself you type the name of the project
At terminal run the command py uniquely_observed_species.py your_CSV.csv > results.html (there’s some clues on how to use it with different options in the file uniquely_observed_species_noconfig.py)
wait for output.
In my case that command didn’t work with an error saying
No such file or directory: 'data [csv name] config.yaml'
but it worked if i used the noconfig.py file instead
Although i got another error related to species with name containing a “-”
glad you managed to get it to work, but the noconfig version is very old and I’m surprised it works at all any more! Seeing as people are interested in running it themselves, I will add some actual documentation and a sample config for the latest version. I’ll also take out the parts which are hardcoded for Vienna :)
oh yes that would be great, thanks! This category seemed the most appropriate place, I didn’t realise it would disappear imminently
Do you have a sample config.yaml? The output from uniquely_observed_species.py seems like it’d be nicer but I’m not sure what all I need in the config.yaml file. I’m also seeing a handful of bugs in the _noconfig.py version which it looks like you’ve fixed some of those in the with-config version:
There seems to be a bug where it tries to create urls with &page=1&page=2 which causes a 500 error in the iNaturalist API. Changing lines 43 and 44 to
so the original api_url isn’t getting overwritten and appended to every time fixes the issue for me.
The notable species list is outputting lots of nans for taxon IDs and names. Can’t figure out why.
Also, the taxa links in the final output html all 404 for me, because they’re mostly appended with “.0” after the taxon ID (e.g. https://www.inaturalist.org/taxa/213892.0). It looks like you fixed this in the with-config version.
EDIT: Missed your last post saying _noconfig is super old and that you’re gonna add a sample config, my bad!
Your post is well timed, I spent the last hour working on the script and documentation to make it a bit easier to use. The older _api and _noconfig versions are gone, replaced with the version which actually works, now with documentation and an example config!
This is a very useful tool to locate “notable-but-actually-not-that-much-because-this-is-not-from-this-continent” observations to clean up these projects. I’ve been using it on brazilian CNC projects with nice results.
I had to change the code a bit in order to get less unicode character errors by adding , encoding='utf-8') to all “open” commands . These happened mostly with common names that had the “ā” letter (which is not even used in portuguese)
ha ha yes, it unintentionally also works as a tool for quickly finding and correcting completely wrong IDs! Maybe I should change it to “Firsts, Notable, and Wildly Misidentifed Observations”
interesting, what platform are you on? I’ve never had any issues with this on mac os or linux with e.g. German exports, but I can add this to the script if it’s helpful for others
This is a very useful tool to locate “notable-but-actually-not-that-much-because-this-is-not-from-this-continent” observations to clean up these projects. I’ve been using it on brazilian CNC projects with nice results.
Yes! I also used the analysis to find several incorrect IDs for our project. It was very useful for that!