Gets the requested records from IntChron in JSON format and parses them to a named list.

intchron_request(url, strict = FALSE)

Arguments

url

Vector of addresses to IntChron records. See intchron_url().

strict

If TRUE, will treat non-success HTTP status codes as fatal errors. If FALSE (the default), will attempt to recover from them. See details.

Value

A list of parsed responses.

Details

This function is intended to make batch requests to IntChron, so by default it tries to recover from HTTP errors wherever possible. Requests for records that don't exist or which produce a server error return NA with a warning. To disable this behaviour and stop execution when HTTP errors occur, set strict = TRUE.

See also

Other functions for interacting with the IntChron API: intchron_crawl(), intchron_extract(), intchron_tabulate(), intchron_url()

Examples

intchron_request(intchron_url("record", "oxa", "Jordan", "Dhuweila"))
#> $`record/oxa/Jordan/Dhuweila`
#> $`record/oxa/Jordan/Dhuweila`$data_url
#> [1] "https://c14.arch.ox.ac.uk/database/public.php?record=Jordan/Dhuweila"
#> 
#> $`record/oxa/Jordan/Dhuweila`$json_application
#> [1] "INTCHRON.Project"
#> 
#> $`record/oxa/Jordan/Dhuweila`$records
#>       site country   record longitude latitude selected
#> 1 Dhuweila  Jordan Dhuweila     37.25  32.0833     TRUE
#>                                                                   file
#> 1 https://c14.arch.ox.ac.uk/database/public.php?record=Jordan/Dhuweila
#>   file_data.header.site file_data.header.country file_data.header.record
#> 1              Dhuweila                   Jordan                Dhuweila
#>   file_data.header.longitude file_data.header.latitude
#> 1                      37.25                   32.0833
#>                                                                                                                                                                                                                                                                                                                                             file_data.series_list
#> 1 R_Datelist, TRUE, OxA-1636, OxA-1637, OxA-1728, OxA-1729, 0, 0, 37.25, 37.25, 0, 0, 32.0833, 32.0833, 2202/4217, 2202/2133, 4225, 4118, charcoal, charcoal, charcoal, charcoal, -, -, -, -, -26, -26, -26, -26, 7030, 8350, 7140, 7450, 90, 100, 90, 90, , , , , 0.416804, 0.353645, 0.411135, 0.395571, 0.00466978, 0.0044024, 0.00460627, 0.00443189, ref:AM9
#>   file_data.refs
#> 1        ref:AM9
#> 
#> $`record/oxa/Jordan/Dhuweila`$bibliography
#>   ref firstauthor year reftype
#> 1 AM9      Hedges 1989 article
#>                                                       author
#> 1 Hedges, R E M and Housley, R A and Law, I A and Bronk, C R
#>                                                                   title
#> 1 Radiocarbon dates from the Oxford AMS system: Archaeometry Datelist 9
#>        journal volume number pagefrom pageto series publisher address booktitle
#> 1 Archaeometry     31      2      207    234                                   
#>   chapter edition organization school institution           url doi isbn
#> 1      NA      NA                                 dl\\_am9.html         
#>              citation
#> 1 Hedges  et al. 1989
#>                                                                                                                                                                   reference
#> 1 Hedges, R. E. M., Housley, R. A., Law, I. A., & Bronk, C. R. (1989). Radiocarbon dates from the Oxford AMS system: Archaeometry Datelist 9. Archaeometry, 31(2), 207-234.
#> 
#> $`record/oxa/Jordan/Dhuweila`$schema
#> [1] "https://intchron.org/schema"
#> 
#> $`record/oxa/Jordan/Dhuweila`$compilation
#> $`record/oxa/Jordan/Dhuweila`$compilation$by
#> [1] "Oxford Radiocarbon Accelerator Unit"
#> 
#> $`record/oxa/Jordan/Dhuweila`$compilation$url
#> [1] "https://c14.arch.ox.ac.uk/database"
#> 
#> $`record/oxa/Jordan/Dhuweila`$compilation$updated
#> [1] "2023-07-06T14:52:29+01:00"
#> 
#> $`record/oxa/Jordan/Dhuweila`$compilation$retrieved
#> [1] "2023-07-26T07:41:49+01:00"
#> 
#> 
#>