Parse Old Bailey Trials
parse_trials.Rd
For parsing Old Bailey trial data.
Arguments
- xml_address
One or more XML addresses. A single XML address can be passed as a string, or numerous XML addresses can be passed as a list.
Examples
# Return a dataframe with parsed trial data.
xml_address <- "https://www.oldbaileyonline.org/obapi/text?div=t17690112-9"
parsed_trial <- parse_trials(xml_address)
#> Warning: incomplete final line found on 'https://www.oldbaileyonline.org/obapi/text?div=t17690112-9'
#> [1] "Parsing https://www.oldbaileyonline.org/obapi/text?div=t17690112-9"
#> [1] "1 out of 1 trials."
#> [1] "Parsing https://www.oldbaileyonline.org/obapi/text?div=t17690112-9"
#> [1] "1 out of 1 trials."
#> Warning: incomplete final line found on 'https://www.oldbaileyonline.org/obapi/text?div=t17690112-9'
head(parsed_trial)
#> trial_account_id defendant_name defendant_gender victim_name victim_gender
#> 1
#> crime_location offence_category offence_subcategory punishment_category
#> 1
#> punishment_subcategory verdict verdict_subcategory speech_id speaker_name
#> 1 0
#> body_text date xml_address
#> 1 https://www.oldbaileyonline.org/obapi/text?div=t17690112-9