Open matt-dray opened 4 years ago
Not much of a problem. Just some minor code duplication when reading a PDF.
get_national_data() and get_subnational_data() both do this:
get_national_data()
get_subnational_data()
report_data <- pdftools::pdf_data(url)
Mild refactor to create a separate PDF-reading step that then feeds into e.g. get_national_data() and get_subnational_data().
Minimal. Some efficiency is gained from reading PDFs just once from a given URL.
Problem
Not much of a problem. Just some minor code duplication when reading a PDF.
Example
get_national_data()
andget_subnational_data()
both do this:Solution
Mild refactor to create a separate PDF-reading step that then feeds into e.g.
get_national_data()
andget_subnational_data()
.Risk
Minimal. Some efficiency is gained from reading PDFs just once from a given URL.