Skip to contents

Utilities

Functions that can improve your workflow

apply_if()
Apply function if condition holds
batch_vector()
Split a vector into sequential batches
cusip8_to_cusip9()
Map 8-digit CUSIP to 9-digit CUSIP
fread_chunked()
Chunked Fread
index_split()
Split a vector into modulus batches
list_to_str()
Serialize a list into a string representation
print_if()
Print object if condition holds
print_nrow()
Print number of rows
parse_year_params()
Parse RMarkdown Year Parameters

WRDS

Programmatically access WRDS

wrds_connect()
Connect to WRDS
wrds_schema_tables()
WRDS Tables
wrds_schemata()
WRDS Schemata
wrds_table_columns()
WRDS Table Columns
wrds_table_count()
WRDS Table Count

DataForSEO

Search for keywords in DataForSEO’s Google Organic Search

dfs_search()
Small DFS Search
dfs_search_reqs()
Large DFS Search

PatentsView

Interact with PatentsView data

compute_patents_view_schema()
Get PatentsView Schema
download_patents_view()
Read a table from PatentsView
download_patents_view_to_s3()
Write a table from PatentsView to S3
download_patents_view_to_s3_chunked()
Write a table from PatentsView to S3
patents_view_schema
PatentsView Schema
repair_pv_filing_dates()
Repair PatentsView Filing Dates

AWS

Mostly wrappers around functions in the paws package

s3_key_exists()
Check whether S3 key exists
s3_key_exists_list()
Apply s3_key_exists recursively to S3 keys in a list
s3_list_files()
List Files on S3
s3_list_subfolders()
List S3 Subfolders
s3_read_json()
Read JSON file from S3
ec2_on_demand_limit()
EC2 On-Demand Limit
ec2_vcpu_usage()
EC2 vCPU Usage
execute_on_cluster()
Execute a parameterized RMD on cluster
get_most_recent_inventory_date()
Get Most Recent Inventory Date
read_inventory()
Read Inventory
write_json_to_s3()
Write JSON to S3