Skip to contents

The API uses unique IDs (sqids) to identify each filter column and its contents (filter items). This function parses those into the data creators' id and item labels based on the meta data stored on the API for the data set.

Usage

parse_sqids_filters(filters, meta, verbose = FALSE)

Arguments

filters

A set of filter item columns as taken from a data set downloaded from the API

meta

Meta data for the data set as provided by get_meta()

verbose

Run in verbose mode with debugging messages

Value

Data frame

Examples

example_data_raw() |>
  magrittr::use_series("filters") |>
  parse_sqids_filters(get_meta(example_id(group = "attendance")))
#>         attendance_status               attendance_type day_number
#> 1              Attendance                       Present          1
#> 2              Attendance Approved educational activity          1
#> 3              Attendance                         Total          1
#> 4                 Absence                         Total          1
#> 5                 Absence                    Authorised          1
#> 6                 Absence                  Unauthorised          1
#> 7           Late sessions                         Total          1
#> 8       Possible sessions                         Total          1
#> 9              Attendance                       Present          1
#> 10             Attendance                       Present          1
#> 11             Attendance                       Present          1
#> 12             Attendance                          Late          1
#> 13                Absence                    Authorised          1
#> 14                Absence                    Authorised          1
#> 15                Absence                    Authorised          1
#> 16                Absence                    Authorised          1
#> 17                Absence                    Authorised          1
#> 18                Absence                    Authorised          1
#> 19                Absence                    Authorised          1
#> 20                Absence                    Authorised          1
#> 21             Attendance Approved educational activity          1
#> 22 Not a possible session                         Total          1
#> 23             Attendance Approved educational activity          1
#> 24             Attendance Approved educational activity          1
#> 25             Attendance Approved educational activity          1
#> 26                Absence                  Unauthorised          1
#> 27                Absence                  Unauthorised          1
#> 28                Absence                  Unauthorised          1
#> 29                Absence                  Unauthorised          1
#> 30    Administrative code           Administrative code          1
#> 31 Not a possible session                         Total          1
#> 32    Administrative code           Administrative code          1
#>    education_phase                          attendance_reason
#> 1          Special                                      Total
#> 2          Special                                      Total
#> 3          Special                                      Total
#> 4          Special                                      Total
#> 5          Special                                      Total
#> 6          Special                                      Total
#> 7          Special                                      Total
#> 8          Special                                      Total
#> 9          Special                                 Present am
#> 10         Special                                 Present pm
#> 11         Special                                    Present
#> 12         Special     L present late before registers closed
#> 13         Special                       I authorised illness
#> 14         Special                M authorised medical dental
#> 15         Special          R authorised religious observance
#> 16         Special                   S authorised study leave
#> 17         Special                   T authorised grt absence
#> 18         Special                       H authorised holiday
#> 19         Special                      E authorised excluded
#> 20         Special                         C authorised other
#> 21         Special                       B education off site
#> 22         Special                        D dual registration
#> 23         Special               P approved sporting activity
#> 24         Special                   V educational visit trip
#> 25         Special                          W work experience
#> 26         Special                     G unauthorised holiday
#> 27         Special U unauthorised late after registers closed
#> 28         Special                       O other unauthorised
#> 29         Special                            N no reason yet
#> 30         Special               Not attending planned closed
#> 31         Special           Y not attending enforced closure
#> 32         Special                Z not attending not on roll