How to replicate world tour figures?

the snapshot of the data from back in the day appears to be here: https://github.com/inaturalist/inaturalist.github.io/tree/master/country_stats

i’m guessing the way these stats were produced back then was only partly automated. so even if you got all of loarie’s code and process steps, it would probably still require someone to manually execute the process to generate the data for a place and snapshot in time.

i can envision a way to generate this information dynamically so that you would be able to just input a place id in a web page, and it would automatically generate all the figures, but that would take someone to code it. (that code does not already exist, as far as i know.)

currently, there is probably not a very efficient way to produce this map.

it’s relatively easy to figure out who the top observers are in any place / area, and it’s easy to figure out how many observations they have in the area, and it’s easy to get user profile pics.

the hard/inefficient part is positioning the markers on the map based on where the center of gravity of observations is for an observer. loarie describes generally how he’s doing it here: https://forum.inaturalist.org/t/china-inaturalist-world-tour/5440/4. he’s basically figuring out the top 50 observers in an area using the top observers API endpoint (http://api.inaturalist.org/v1/docs/#!/Observations/get_observations_observers), then downloading all observations in the area for each top observer, and then probably running it through some algorithm in R to find that center of gravity.

i can think of a potentially more efficient way to do this using UTFgrid data, but it would take some novel coding. someone would have to sit down and code things initially before it would be efficient/easy for others to generate these maps. for some insight into how UTFgrids could be used, see this (https://forum.inaturalist.org/t/looking-for-inaturalist-observation-map-visualisation-suggestions/7322/11) and subsequent posts in that thread.

if you look at this thread (https://forum.inaturalist.org/t/1m-observations-this-month/2582), you’ll find the R code that loarie is using to generate the line charts. in that same thread, i’ve provided an alternate way to get similar stats + a zoomable bar chart (not a line chart, though it would be relatively easy to switch to a line chart) without having to go through R. both these methods basically rely on the iNat API observation histogram endpoint (http://api.inaturalist.org/v1/docs/#!/Observations/get_observations_histogram). so you could also create your own chart by hitting that endpoint.

4 Likes