View source: R/inspections_table.R
insp_load_data | R Documentation |
insp_load_data()
loads the data from an excel workbook into the R
session. standardizes column names, and optionally checks that the column
names match expected values.
insp_load_data(
path = coviData::path_create("V:/Compliance/Inspection Data for Publishing/",
"Grand List of Inspections", ext = "xlsx"),
check = TRUE
)
path |
The path to the excel workbook containing inspections data |
check |
Should column names be checked? See Details for more information on name checking. |
If check = TRUE
, insp_load_data()
expects at least five columns
giving information on the (last?) inspection visit date, the business name,
the business address, the number of total violations by the business, and the
closure date (if it exists). The expected values of the column names are
formulated as generally as possible to allow for human error. The columns are
matched as follows:
inspection visit date must contain the words "date" and "visit"
business name must contain the words "name" and "business"
business address must contain the word "address"
number of violations must contain the word "violations"
closure date must contain the string "clos" and the word "date"
A tibble
containing the inspections data
Other functions in the inspections data pipeline (
insp_prep_data()
,
insp_create_table()
,
insp_save_table()
,
insp_archive_table()
) and the wrapper for the full workflow
(
insp_table_pipeline()
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.