Skip to content

Commit

Permalink
Merge pull request #32 from epiforecasts/fix-checks
Browse files Browse the repository at this point in the history
Fix R-CMD-check
  • Loading branch information
Sophie Meakin authored Sep 22, 2022
2 parents 87eb7a8 + 75cf1a7 commit bd66ebb
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 10 deletions.
17 changes: 12 additions & 5 deletions data-raw/england_ltla_shape.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
library(sf)
library(dplyr)
library(usethis)
library(here)
library(stringr)
pacman::p_load(
sf,
here,
dplyr,
stringr,
usethis
)

england_ltla_shape <- sf::read_sf(here::here("data-raw", "raw", "uk_ltla_shp", "ltla_uk.shp")) %>%
sf::st_transform(27700) %>%
Expand All @@ -13,4 +15,9 @@ england_ltla_shape <- sf::read_sf(here::here("data-raw", "raw", "uk_ltla_shp", "
geo_name = LAD20NM
)

# Replace non-ASCII character (degree symbol) with corresponding ASCII code
st_crs(england_ltla_shape)$wkt <- gsub(pattern = "°",
replacement = "\\\u00b0",
x = st_crs(england_ltla_shape)$wkt)

usethis::use_data(england_ltla_shape, overwrite = TRUE)
17 changes: 12 additions & 5 deletions data-raw/england_utla_shape.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
library(sf)
library(dplyr)
library(usethis)
library(here)
library(stringr)
pacman::p_load(
sf,
here,
dplyr,
stringr,
usethis
)

england_utla_shape <- sf::read_sf(here::here("data-raw", "raw", "uk_utla_shp", "utla_uk.shp")) %>%
sf::st_transform(27700) %>%
Expand All @@ -14,4 +16,9 @@ england_utla_shape <- sf::read_sf(here::here("data-raw", "raw", "uk_utla_shp", "
) %>%
dplyr::mutate(geo_code = ifelse(geo_code == "E10000002", "E06000060", geo_code))

# Replace non-ASCII character (degree symbol) with corresponding ASCII code
st_crs(england_utla_shape)$wkt <- gsub(pattern = "°",
replacement = "\\\u00b0",
x = st_crs(england_utla_shape)$wkt)

usethis::use_data(england_utla_shape, overwrite = TRUE)
Binary file modified data/england_ltla_shape.rda
Binary file not shown.
Binary file modified data/england_utla_shape.rda
Binary file not shown.

0 comments on commit bd66ebb

Please sign in to comment.