rspatial / geodata

download geographic data
GNU General Public License v3.0
147 stars 15 forks source link

'sp_occurrence' documentation suggestions #41

Closed AMBarbosa closed 1 year ago

AMBarbosa commented 1 year ago

In the 'sp_occurrence' help file (not run) examples, plot(gs) tries to plot an entire dataframe, which results in Error in plot.new() : figure margins too large. I think it should be plot(gs$lon, gs$lat).

It would also be very useful to provide a usage example for 'args'. From the argument description, it's difficult to uderstand how exactly it should be specified. For example, is it possible to download only records where the Year column is either NA or within a given range of values, or more recent than a given year?

Cheers and thanks again for the great package!

rhijmans commented 1 year ago

Thanks. I have added some args examples. Some arguments support "range queries" (including "year"; and see https://www.gbif.org/developer/occurrence#p_identifiedBy for details), such that you can request a range of years. I do not know how you would query for missing years.

By the way, I have added a new function sp_occurrence_split that can download the occurrence data for species with > 100,000 records. This can take a very long time, but it may be useful in some cases.