Skip to content
This repository has been archived by the owner on Apr 28, 2022. It is now read-only.

Code duplication for PDF reading #6

Open
matt-dray opened this issue Apr 14, 2020 · 0 comments
Open

Code duplication for PDF reading #6

matt-dray opened this issue Apr 14, 2020 · 0 comments
Milestone

Comments

@matt-dray
Copy link

Problem

Not much of a problem. Just some minor code duplication when reading a PDF.

Example

get_national_data() and get_subnational_data() both do this:

report_data <- pdftools::pdf_data(url)

Solution

Mild refactor to create a separate PDF-reading step that then feeds into e.g. get_national_data() and get_subnational_data().

Risk

Minimal. Some efficiency is gained from reading PDFs just once from a given URL.

@mattkerlogue mattkerlogue added this to the Code refactor milestone Apr 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants