Code Monkey home page Code Monkey logo

Comments (6)

sckott avatar sckott commented on June 11, 2024

Good idea. We may be able to do this for some kinds of options, but not all.

Another option is that I currently have a parameter for each of the source data pkgs, gbifopts, 'rinatopts', etc. in which you can specify the arguments for searching each data source, e.g. https://github.com/ropensci/occdat/blob/master/R/occ.r#L27

Does that work?

from spocc.

karthik avatar karthik commented on June 11, 2024

Why not just pass the extras with ... for now? It would be good to just keep track of a list for now, build everything and standardize once they are working.

from spocc.

emhart avatar emhart commented on June 11, 2024

I was thinking there are some pretty standard types of options we'll want to pass. So the dates example it makes sense to just let users pass dates as one format and then we can parse it for each package. Maybe we should have a table of all the different options of each API and see which we want to include, and which we could standardize.

from spocc.

sckott avatar sckott commented on June 11, 2024

I am more or less doing ..., but I didn't know of a way to do multiple ...'s in a single function, so I pass by default empty lists to a do.call call - and user can populate each list if they want to specify parameters.

from spocc.

sckott avatar sckott commented on June 11, 2024

@emhart yeah, good idea to start thinking about standardizing

from spocc.

sckott avatar sckott commented on June 11, 2024

Possible options to bring into the main occ function as standardized across sources:

ChangeTo gbif bison inat npn ebird ecoengine Notes
limit limit count maxresults nope max page = "all" -
geometry geometry aoibbox bounds nope nope bbox 1
curlopts callopts callopts nope NA ... foptions -

I'm not sure many others are possible to make available across sources. Will keep looking.

For these params to use across sources, should just force apply to all applicable sources. And tell user to just pass args to individual sources if they want different settings for different sources

1: This will take some converting of bounds from inat into a WKT - geometry for gbif and aoi for bison already accept WKT

from spocc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.