diff --git a/itsTheCatsStupid/makeFile.R b/itsTheCatsStupid/makeFile.R index 04d44622d729c084e0cc8f76dc59ad7b41916f9e..4de21d625fa30b06706c9cf092c40eecd399b3a5 100644 --- a/itsTheCatsStupid/makeFile.R +++ b/itsTheCatsStupid/makeFile.R @@ -8,17 +8,21 @@ makeReport <- function(f){ ) } -# >> run report ---- +# Run report ---- + +#> set data path ---- +dp <- "~/Dropbox/data/" + +#> define yaml ---- rmdFile <- "itsTheCatsStupid" # not the full path title = "#backOfaFagPacket: Its the Cats, stupid" subtitle = "Does cat ownership correlate with home energy demand?" authors = "Ben Anderson" -# load the postcode data here (slow) -dp <- "~/Dropbox/data/" +#> load the postcode data here (slow) postcodes_dt <- data.table::fread(paste0(dp, "UK_postcodes/PCD_OA_LSOA_MSOA_LAD_AUG20_UK_LU.csv.gz")) postcodes_dt[, pcd_sector := tstrsplit(pcds, " ", keep = c(1))] lsoa_DT <- postcodes_dt[, .(nPostcodes = .N), keyby = .(lsoa11cd, pcd_sector, ladnm, ladnmw)] -# re-run report here +#> re-run report here makeReport(rmdFile) \ No newline at end of file