diff --git a/DESCRIPTION b/DESCRIPTION
index 6325bf1..e86998e 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -5,7 +5,8 @@ Authors@R:
c(
person("Rich", "Bielby", , "richard.bielby@education.gov.uk", role = c("aut", "cre"),
comment = c(ORCID = "0000-0001-9070-9969")),
- person("Cam", "Race", , "cameron.race@education.gov.uk", role = "aut"))
+ person("Cam", "Race", , "cameron.race@education.gov.uk", role = "aut"),
+ person("Laura", "Selby", , "laura.selby@education.gov.uk", role = "ctb"))
Description: An R package with useful utility functions for connecting to, and
processing data from, the DfE's explore education statistics API.
License: MIT + file LICENSE
diff --git a/R/example_id.R b/R/example_id.R
index 91c2652..523a396 100644
--- a/R/example_id.R
+++ b/R/example_id.R
@@ -19,12 +19,14 @@ example_id <- function(
levels = c(
"publication",
"dataset",
- "location",
+ "location_id",
+ "location_code",
"filter_item",
"indicator",
"publication",
"dataset",
- "location",
+ "location_id",
+ "location_code",
"filter_item",
"indicator"
),
@@ -38,6 +40,8 @@ example_id <- function(
"dev",
"dev",
"dev",
+ "dev",
+ "dev",
"dev"
),
example_group = c(
@@ -46,6 +50,8 @@ example_id <- function(
"attendance",
"attendance",
"attendance",
+ "attendance",
+ "public-api-testing",
"public-api-testing",
"public-api-testing",
"public-api-testing",
@@ -56,30 +62,37 @@ example_id <- function(
"b6d9ed96-be68-4791-abc3-08dcaba68c04",
"7c0e9201-c7c0-ff73-bee4-304e731ec0e6",
"NAT|id|dP0Zw",
+ "NAT|code|E92000001",
"hl2Gy",
"bqZtT",
"d823e4df-626f-4450-9b21-08dc8b95fc02",
"830f9201-9e11-ad75-8dcd-d2efe2834457",
"LA|id|ml79K",
- "kKOhs",
- "mRj9K"
+ "NAT|code|E92000001",
+ "HsQzL",
+ "h8fyW"
)
)
- if (!(level %in% example_ids$levels)) {
- stop(
- paste0(
- "Non-valid element level received by validate_id.\n",
- 'Should be one of "publication", "dataset", "filter_item" or indicator.'
+ if (level == "all") {
+ return(example_ids)
+ } else {
+ if (!(level %in% example_ids$levels)) {
+ stop(
+ paste0(
+ "Non-valid element level received by validate_id.\n",
+ "Should be one of:\n",
+ paste(example_ids$levels, collapse = "\", \"")
+ )
)
+ }
+ return(
+ example_ids |>
+ dplyr::filter(
+ example_ids$levels == level,
+ example_ids$environments == environment,
+ example_ids$example_group == group
+ ) |>
+ dplyr::pull("examples")
)
}
- return(
- example_ids |>
- dplyr::filter(
- example_ids$levels == level,
- example_ids$environments == environment,
- example_ids$example_group == group
- ) |>
- dplyr::pull("examples")
- )
}
diff --git a/README.md b/README.md
index e3c527e..d64db87 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# eesyapi
+# eesyapi
[![R-CMD-check](https://github.com/dfe-analytical-services/eesyapi/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/dfe-analytical-services/eesyapi/actions/workflows/R-CMD-check.yaml)
diff --git a/man/figures/logo.png b/man/figures/logo.png
new file mode 100644
index 0000000..0647a25
Binary files /dev/null and b/man/figures/logo.png differ
diff --git a/pkgdown/favicon/apple-touch-icon-120x120.png b/pkgdown/favicon/apple-touch-icon-120x120.png
new file mode 100644
index 0000000..95a3a34
Binary files /dev/null and b/pkgdown/favicon/apple-touch-icon-120x120.png differ
diff --git a/pkgdown/favicon/apple-touch-icon-152x152.png b/pkgdown/favicon/apple-touch-icon-152x152.png
new file mode 100644
index 0000000..730e1ca
Binary files /dev/null and b/pkgdown/favicon/apple-touch-icon-152x152.png differ
diff --git a/pkgdown/favicon/apple-touch-icon-180x180.png b/pkgdown/favicon/apple-touch-icon-180x180.png
new file mode 100644
index 0000000..479c41d
Binary files /dev/null and b/pkgdown/favicon/apple-touch-icon-180x180.png differ
diff --git a/pkgdown/favicon/apple-touch-icon-60x60.png b/pkgdown/favicon/apple-touch-icon-60x60.png
new file mode 100644
index 0000000..88631d6
Binary files /dev/null and b/pkgdown/favicon/apple-touch-icon-60x60.png differ
diff --git a/pkgdown/favicon/apple-touch-icon-76x76.png b/pkgdown/favicon/apple-touch-icon-76x76.png
new file mode 100644
index 0000000..b70bceb
Binary files /dev/null and b/pkgdown/favicon/apple-touch-icon-76x76.png differ
diff --git a/pkgdown/favicon/apple-touch-icon.png b/pkgdown/favicon/apple-touch-icon.png
new file mode 100644
index 0000000..524de1e
Binary files /dev/null and b/pkgdown/favicon/apple-touch-icon.png differ
diff --git a/pkgdown/favicon/favicon-16x16.png b/pkgdown/favicon/favicon-16x16.png
new file mode 100644
index 0000000..d45a726
Binary files /dev/null and b/pkgdown/favicon/favicon-16x16.png differ
diff --git a/pkgdown/favicon/favicon-32x32.png b/pkgdown/favicon/favicon-32x32.png
new file mode 100644
index 0000000..39b6e3c
Binary files /dev/null and b/pkgdown/favicon/favicon-32x32.png differ
diff --git a/pkgdown/favicon/favicon.ico b/pkgdown/favicon/favicon.ico
new file mode 100644
index 0000000..81f189b
Binary files /dev/null and b/pkgdown/favicon/favicon.ico differ
diff --git a/tests/testthat/testdata/example_publication_catalogue.rds b/tests/testthat/testdata/example_publication_catalogue.rds
index 46742e8..c3efc29 100644
Binary files a/tests/testthat/testdata/example_publication_catalogue.rds and b/tests/testthat/testdata/example_publication_catalogue.rds differ
diff --git a/tests/testthat/testdata/example_publication_datasets.rds b/tests/testthat/testdata/example_publication_datasets.rds
index 90bdb50..f815280 100644
Binary files a/tests/testthat/testdata/example_publication_datasets.rds and b/tests/testthat/testdata/example_publication_datasets.rds differ