diff --git a/data-raw/ames_housing.R b/data-raw/ames_housing.R index 75b67e1..464de3a 100644 --- a/data-raw/ames_housing.R +++ b/data-raw/ames_housing.R @@ -1,3 +1,6 @@ -url = "https://raw.githubusercontent.com/ja-thomas/extend_ames_housing/main/data/ames_dirty.csv" -ames_housing = data.table::fread(url, stringsAsFactors = TRUE) +requireNamespace("rprojroot") +requireNamespace("data.table") +root = rprojroot::find_package_root_file() + +ames_housing = data.table::fread(file.path(root, "data-raw", "ames_housing.csv.bz2"), stringsAsFactors = TRUE) usethis::use_data(ames_housing, overwrite = TRUE, compress = "xz") diff --git a/data-raw/ames_housing.csv.bz2 b/data-raw/ames_housing.csv.bz2 new file mode 100644 index 0000000..373a8bc Binary files /dev/null and b/data-raw/ames_housing.csv.bz2 differ diff --git a/data-raw/energy_usage.R b/data-raw/energy_usage.R index 700ced0..a6e3d11 100644 --- a/data-raw/energy_usage.R +++ b/data-raw/energy_usage.R @@ -1,3 +1,6 @@ -url = "https://raw.githubusercontent.com/ja-thomas/extend_ames_housing/main/data/energy_usage.csv" -energy_usage = data.table::fread(url, stringsAsFactors = TRUE) +requireNamespace("rprojroot") +requireNamespace("data.table") +root = rprojroot::find_package_root_file() + +energy_usage = data.table::fread(file.path(root, "data-raw", "energy_usage.csv.bz2"), stringsAsFactors = TRUE) usethis::use_data(energy_usage, overwrite = TRUE, compress = "xz") diff --git a/data-raw/energy_usage.csv.bz2 b/data-raw/energy_usage.csv.bz2 new file mode 100644 index 0000000..5c4d368 Binary files /dev/null and b/data-raw/energy_usage.csv.bz2 differ