jasonratcliff / thesis

Source code and data for MSc thesis
https://scholarworks.uni.edu/etd/1108
Other
0 stars 0 forks source link

Implement persistent package data best practices #102

Closed jasonratcliff closed 1 year ago

jasonratcliff commented 1 year ago

Use CRAN convention for writing R package persistent data by setting R option thesis.data to the following path:

tools::R_user_dir('thesis', which = 'data')

Downloads of tigris shapefiles are minimized, storing a set of states borders and separate state county boundaries to individual .rda files as paths from thesis.data. This option is set by .onLoad() when the package namespace is loaded.

Two new public methods are defined to retrieve data via tigris:

After downloading, the respective simple features sf data frames are assigned as R6 public fields:

Closes #86