Scripts and functions to process the open grants data and help feed it into Elasticsearch.
The following shell commands assume a working directory that is the root folder, and not the R/
folder that this README resides in.
To run the data generation loop, use
Rscript R/load_grants_data.R
To run the example PDF retrieval script, use
Rscript R/example_retrieve-pdf.R
magrittr
rvest
httr
here
elastic
load_grants_data.R
- commented script to load grant metadata and pdfs into Elasticsearchexample_retrieve-pdf.R
- commented script demo-ing the functions to read in the opengrants.csv data table and resolve individual links into PDF streamsretrieve_pdf.R
- function definitions to resolve links into PDF streamsmake_elasticsearch_doc.R
- function definitions to load data into Elasticsearch{repo root}/opengrants.csv
, or by reading in the output csv file and processing it better