nsf_return: Retrieve table of grant information

Description Usage Arguments Value Examples

View source: R/rnsf.R

Description

Retrieve table of grant information

Usage

1
2
3
4
5
6
7
8
nsf_return(
  keyword = NULL,
  zipcode = NULL,
  agency = NULL,
  verbose = TRUE,
  print_fields = print_fields_get(),
  save_file = NULL
)

Arguments

keyword

Optional keyword to search on

zipcode

Optional zip code to limit search to (note that you should try both 5 and 9 digit). Note that there are often grants that lack zip code info

agency

Agency to search for (NSF or NASA)

verbose

If TRUE, outputs progress

print_fields

Names of elements to return (see NSF API documentation)

save_file

File to save results to while running

Value

A data frame with returned info

Examples

1
2
3
4
5
6
7
8
ants <- nsf_return(keyword="Formicidae")
nsf_wordcloud(ants$abstractText)

sanderson <- nsf_return(keyword="Sanderson")
mjs.PI <- sanderson[grepl("Michael J Sanderson",sanderson$pdPIName),] #note the lack of period for middle initial in the search string
mjs.CoPI <- sanderson[grepl("Michael J Sanderson",sanderson$coPDPI),]
mjs.grants <- rbind(mjs.PI, mjs.CoPI)
plot(x=lubridate::mdy(mjs.grants$startDate), y=mjs.grants$fundsObligatedAmt, pch=20, log="y", bty="n", xlab="Start date", ylab="Funding amount in US dollars")

bomeara/rnsf documentation built on Sept. 7, 2020, 11:12 a.m.