pyinat / pyinaturalist

Python client for iNaturalist
https://pyinaturalist.readthedocs.io
MIT License
133 stars 16 forks source link

Add data visualization examples #62

Open JWCook opened 4 years ago

JWCook commented 4 years ago

Summary

In order to show off some of the cool data that iNaturalist provides, combined with the power of python, it would be great to add some examples to the README that make use of data visualization tools.

Background Info

If you are coming here from Hacktoberfest or the good-first-issue topic, welcome! Recommended experience includes:

Tasks

I would like to have examples with at few different different data visualization tools, each making use of one or more pyinaturalist API functions. You could pick any of the following:

  1. A basic example using pandas + matplotlib and/or seaborn,
  2. A fancier example using bokeh or altair
  3. A geospatial example using geoviews

Submission

Reference & Examples

Visualization Ideas

These are just some suggestions, so feel free to come up with your own!

Matplotlib: Pick two species with a predator-prey relationship, and create a scatter plot of their populations in different discrete regions (like all states in the US, or territories & provinces in Canada, or provinces in South Africa, etc.)

Bokeh:

GeoViews:

JWCook commented 4 years ago

@niconoe This is something I had wanted to do for awhile, but I haven't gotten around to it yet. I think this is something that could be doable without much prior experience (after following the linked docs & tutorials), so I thought it would be worth opting this into DigitalOcean's Hacktoberfest, which is intended to help new developers get experience with open source projects.

Let me know if you have any thoughts or suggestions for this!

Also, could you please add the hacktoberfest topic to pyinaturalist in the 'About' section? It looks like that can only be done by the repo owner.

niconoe commented 4 years ago

@JWCook : really great idea, both for iNaturalist visibility and including newcomers, well done. I haven't heard of Hacktoberfest before.

The topic is now added, tell me if I can help further (caveat: as usual, I have much less free time than I'd like...)

samtreesandbushes commented 3 years ago

@niconoe @JWCook

I'm experimenting with PyiNaturalist on Jupyter Notebooks atm if there is anything that hasn't been resolved here....or anything similar that might be of use .....

( I'm just figuring out a friendly template for UK users to siphon data off into the format needed for UK recording hub....but would love to contribute here if possible )

JWCook commented 3 years ago

@samtreesandbushes That would be great! What datavis libraries are you familiar with? This issue is a fairly open-ended one, so any examples that you think would be useful to others would be welcome; it doesn't necessarily have to be a data visualization.

Jupyter notebooks can go under the examples directory. Soon I'll have that integrated with Sphinx, so notebooks will also show up in the documentation on readthedocs.

samtreesandbushes commented 3 years ago

@JWCook - Ok nice. Its been great so far - got the details I need for UK recording schemes, with conversion to our grid reference system and things. I´m hoping to put out a super simple final version which I´ll share, just walking slowly through it all for someone who hasn´t used Jupyter Notebooks / Python at all ( e.g. for UK folks who need to do what I´m doing but might not have coding experience ). I wondered if they could use the final notebook directly in the browser even ...saw mention its possible through Google Collabs(?)

Mainly used matplotlib and Seaborn. Think I´ve had a quick go with Bokeh. There's a few other things I'm interested in making notebook for also.

JWCook commented 3 years ago

Sounds good! Binder is another option for sharing interactive notebooks. It works with a GitHub repo, and the interface is just Jupyter. Google Colab has a slightly different interface, and uses Google Drive instead of git. Both would be worth checking out.

Also, if there are users who don't know python but are familiar with Docker, it may be helpful to provide a Docker image to simplify running Jupyter locally. See examples/Dockerfile for one that adds pyinaturalist and a few other packages to the Jupyter scipy-notebook image. Feel free to use or modify that.

Your project sounds interesting! I'm not familiar with the UK recording hub; is that part of the iNat Network, or a different biodiversity organization?

samtreesandbushes commented 3 years ago

Ok! Nice, will look into these options.

iRecord is a central hub for UK biological recording. Its a portal for records to be checked and verified by experts and recording schemes before they reach the national database. There is a lot of recording schemes in UK for different taxa and different regions...so the whole structure is pretty convoluted.

I have uploaded the notebook into my github for now, and added an intro to it in the iNat forum. Do you want a copy of this Notebook in your examples too? Or a version with less text... less-specific to iRecord?