Skip to contents

A neutral citation such as "2007 BCSC 1700" names its court (BCSC) and CanLII's case id is the citation in lower case without spaces ("2007bcsc1700"). The Supreme Court of Canada is the one court whose database id differs from its citation code ("csc-scc"). Reporter-style citations ("[1959] SCR 121") have no derivable id and come back NA.

Usage

morie_ingest_canlii_case_id(citation)

Arguments

citation

Character vector of citations.

Value

A data.frame with citation, database_id and case_id, NA where the citation is not neutral.

Examples

morie_ingest_canlii_case_id(c("2007 BCSC 1700", "2008 SCC 9", "[1959] SCR 121"))
#>         citation database_id      case_id
#> 1 2007 BCSC 1700        bcsc 2007bcsc1700
#> 2     2008 SCC 9     csc-scc     2008scc9
#> 3 [1959] SCR 121        <NA>         <NA>