GithubHelp home page GithubHelp logo

ericr's Introduction

Lifecycle: experimental

devtools::install_github("sjgknight/ericr")

Follows guidance at https://colinfay.me/build-api-wrapper-package-r/ And https://ropensci.org/blog/2022/06/16/publicize-api-client-yes-no/ (or, at least, they were very helpful and any errors are my own)

Using ERIC API documented at https://eric.ed.gov/?api#/default/get_eric_

For Python check https://eric.ed.gov/pdf/Using_ERIC_API_for_Research_Topics.pdf

See for an alternative approach to the functions https://httr2.r-lib.org/articles/wrapping-apis.html

A first attempt at a package, it is very rough...

It would be useful to extend by:

  1. Adjusting the search approach to a different incremental method (ideally one that would allow updating by date, without adjusting the query)
  2. Would facilitate search structures that are irritating to run manually, e.g. ERIC has no 'Title-Abstract-Keyword' search, but this could be done (inefficiently) programmatically and results combined/through the define_query function which could take TAK as a field and correctly create the Boolean (Title:[terms] OR Abstract:[terms] OR Keyword:[terms], for each comma separated term-phrase provided)
  3. Modify the functions for specifying Boolean logic between query elements (ERIC 'advanced search' is not particularly intuitive in the UI so this seems like a thing that could be made easier in a package. The proquest UI to ERIC is easier)
  4. General tidying up of code...

x <- list(TAK = c("hello world", "second one")) purrr::map(x$TAK, function(.x){ mytak <- list(Title = .x, Abstract = .x, Keyword = .x) mytak <- paste0(names(mytak), ":", mytak, collapse = " OR ") paste0("(", mytak ,")")}) |> paste0(collapse = " AND ")

Then build it with: devtools::check() devtools::build()

use_testthat() use_vignette("{your-package-name}") use_readme_rmd()

ericr's People

Contributors

sjgknight avatar

Watchers

 avatar

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.