Skip to contents

Turns the cases_cited_<language> list column of an A2AJ case data.frame into an edge list, one row per (citing, cited) pair, in the order the citations first appear in the decision. Feed the result to any graph routine; table(edges$to) is the in-corpus citation count of each cited decision.

Usage

morie_ingest_a2aj_citation_edges(x, language = c("en", "fr"))

Arguments

x

A data.frame from morie_ingest_a2aj_load or morie_ingest_a2aj_fetch with include_citations = TRUE.

language

"en" (default) or "fr": which citation column and citation string to use.

Value

A data.frame with character columns from (the citing decision's neutral citation) and to (the cited one).

Examples

x <- data.frame(citation_en = c("2020 SCC 1", "2021 ONCA 2"))
x$cases_cited_en <- I(list(c("2019 SCC 9", "2018 FCA 3"), character(0)))
morie_ingest_a2aj_citation_edges(x)
#>         from         to
#> 1 2020 SCC 1 2019 SCC 9
#> 2 2020 SCC 1 2018 FCA 3