Git Product home page Git Product logo

awardfindr's Introduction

rOpenSci

Project Status: Abandoned

This repository has been archived. The former README is now in README-NOT.md.

awardfindr's People

Contributors

adam3smith avatar isaaconline avatar mccallc avatar nniiicc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

awardfindr's Issues

Error in vignette

Via https://ropensci.r-universe.dev/builds

We see

library("awardFindR")
nsf_and_nih <- search_awards(
  keywords = c("ethnography", "qualitative data"),
  sources = c("nsf", "nih"),
  from_date = "2018-01-01",
  to_date = "2018-05-01"
)
#> Warning in request(paste0(query_url, "&offset=", offset), "get", verbose): Bad
#> Request (HTTP 400).

#> Warning in request(paste0(query_url, "&offset=", offset), "get", verbose): Bad
#> Request (HTTP 400).
#> No results from NSF
#> Error in (function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE, : arguments imply differing number of rows: 1, 0

Created on 2023-07-20 with reprex v2.0.2

Add contributing.md or equivalent

We have some very basic guidelines in the Readme, but both for ourselves and future contributors, we'd want a full set of style guidelines including:

  • structure of new packages (as per #14 )
  • preferred dependencies
  • anything else?

Submit to RopenSci

This is a longterm goal, but I think this would fit very nicely in their portfolio & would get us additional review

include abstracts

include full abstracts from sources where available

and geographic information where available, too

ophil searches break at deduplication because of missing id

> data <- awardFindR(keywords="qualitative", sources = c("ophil"), from = "2011-01-01")

Grabbing url: https://www.openphilanthropy.org/giving/grants?keys="qualitative"
Error in `[<-.data.frame`(`*tmp*`, awards$id == duplicates$id[n], , value = list( : 
  missing values are not allowed in subscripted assignments of data frames

Sources changed interface

Gates foundation and carnegie modules seem to be malfunctoning, probably from changes in the web search engine

Othere databases/API to look at/include

Running list:

Government funders

Private funders

Choose working defaults for function

e.g. awardsBot(keywords = NULL, sources = NULL, from = NULL, to = NULL)

OK to leave keywords blank, but let's set sources to all currently available, from to reasonable start date (something covered by most APIs perhaps) and to to today's date).

Also, if we require keywords (which I think we would) not setting a default treats it as required which I think is right here. Apply similarly to other functions

nih empty

awardFindR::search_awards("qualitative", "nih", "2022-01-01", "2022-01-15")

error: $ operator is invalid for atomic vectors

I changed the keyword argument from "ethnography" in my example to "data" (and even more specifically "data science" (e.g., awardFindR::search_awards(keywords="data")) and I get the following error:

Error: $ operator is invalid for atomic vectors
In addition: Warning message:
In request(url, "post", verbose, payload) : Bad Request (HTTP 400).

Error on Ubuntu

awardFindR::get_nsf("qualitative", "2019-01-01", "2019-02-25")
#> Error in curl::curl_fetch_memory(url, handle = handle): OpenSSL SSL_read: Connection reset by peer, errno 104

Created on 2022-09-12 with reprex v2.0.2

Revisit package naming

Let's think about a more generic name for this -- especially since I think we'll focus on the search rather than the bot part.
How about
awardFindR?

Write access

I was removed from having write access to this repository - whoever has settings access please add me back

RopenSci Kara Woo review

ropensci/software-review#432 (comment)

  • Fix all noted errors/unexpected output in examples
  • Don't force stringAsFactor on user session
  • consistent messages across all functions: include message when no results as in NEH
  • don't show HTTP message unless a new verbose argument is set to TRUE
  • Fix gates documentation and allow full dates in search
  • Better error message for invalid arguments/organizations.

very old NSF and NIH queries have missing data

to recreate:

test <- awardFindR("fieldwork", "nsf", "2010-01-01", "2021-01-01")

result:

Error in (function (..., deparse.level = 1, make.row.names = TRUE, stringsAsFactors = default.stringsAsFactors(),  : 
  numbers of columns of arguments do not match 

error in vignette

๐Ÿ‘‹ @mccallc! Via https://ropensci.r-universe.dev/builds we noticed

library("awardFindR")
nsf_and_nih <- search_awards(keywords=c("ontological", "audio recordings"), sources=c("nsf", "nih"), from_date="2018-01-01", to_date="2018-02-01")
#> Warning in request(url, "post", verbose, payload): Bad Request (HTTP 400).
#> Error in if (response$meta$total == 0) {: argument is of length zero
table(nsf_and_nih$source)
#> Error in table(nsf_and_nih$source): object 'nsf_and_nih' not found
unique(nsf_and_nih$keyword)
#> Error in unique(nsf_and_nih$keyword): object 'nsf_and_nih' not found

Created on 2024-02-02 with reprex v2.1.0

requires 64-bit?

I'm unable to run 64-bit on my work computer getting the failure:

** testing if installed package can be loaded from temporary location
*** arch - i386
*** arch - x64
ERROR: loading failed for 'x64'
Warning message:
In i.p(...) :
  installation of package โ€˜C:/Users/ /AppData/Local/Temp/Rtmp4sRUUN/file9d50511c2763/awardFindR_1.0.1.tar.gzโ€™ had non-zero exit status

Is there a way to make it run in 32-bit?

RSF source bug

To reproduce:

> test <- awardFindR("fieldwork", source="rsf", from="2016-01-01")
GET https://www.russellsage.org/search/node/fieldwork ... OK (HTTP 200).
GET https://www.russellsage.org/search/node/fieldwork?page=1 ... OK (HTTP 200).
GET https://www.russellsage.org/search/node/fieldwork?page=2 ... OK (HTTP 200).
 Error in `$<-.data.frame`(`*tmp*`, "keyword", value = "fieldwork") : 
  replacement has 1 row, data has 0 

missing leading 0 in old NSF IDs

Awards prior to 2010 or so should have leading 0s in their ID numbers, which makes them unsearchable in the NSF web search. These are probably dropped in conversion to a numeric variable type, we should keep them as characters

something up with verbose flag

seach_awards("data science", "nsf", "2000-01-01", "2021-12-31", verbose=F) returns nothing

but

seach_awards("data science", "nsf", "2000-01-01", "2021-12-31", verbose=T) returns a lot

Restructure API functions / apis.R

As per discussion on 2/8: Restructure the apis.R function to be a simple loop/lapply through all sources and move the code that standardizes output into a separate function in the same file as the api_get function. So, e.g., the arnold.R file would contain two functions: arnold_get() and arnold_standardize().

zambujo's RopenSci Review

ropensci/software-review#432 (comment)

Definitely do:

  • Use Roxygen inherit functionality for documentation
  • Move installation instructions toward top of readme (I'd say right after the initial paragraph) + add heading for supported sites and maybe move those down?
  • Check on use of read_csv and readr

Discuss

  • Change main function name to not clash w package name (I'd be inclined to to this)
  • Change verb/subject order of function from neh_get to get_neh. Check whether this is indeed more common. Practically, upside for using neh first is quicker auto-complete. Upside of using get_ first is that you see all get_ functions as part of autocomplete. I could go either way here. Can also ask on Twitter.

failure when variables are missing in df

using the included keywords.txt

> data <- awardsBot(keywords = "~/keywords.csv")
Grabbing url: https://securegrants.neh.gov/Open/data/NEH_Grants2020s.csv
(snip)
NOTICE (non-fatal) no NEH results for: ethnographies
Error in data.frame(institution = Institution, pi_name = pi, pi_email = NA,  : 
  object 'AppNumber' not found

Carnegie maxes out at 25 results

Carnegie function returns a maximum of 25 results, e.g. awardFindR::search_awards("method","carnegie",'1998-01-01','2025-01-01', verbose=TRUE) returns 25, wheras searching for "method" returns here returns 98 results.

Include functions in namespace

Add @export to all functions so they're included in the awardsBot namespace (and thus can be called when installing the packet)

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.