From ff45e536f24896b910789f06dabbded728498b1c Mon Sep 17 00:00:00 2001 From: joeroe Date: Wed, 26 Jul 2023 06:35:36 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20joeroe/r?= =?UTF-8?q?intchron@78c86c0a0ba8b9cf2ffdb7919b5ac88120eb781a=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 404.html | 150 +++----- CNAME | 2 +- LICENSE-text.html | 126 ++----- LICENSE.html | 126 ++----- articles/index.html | 132 ++----- articles/intchron_api.html | 99 +++-- .../figure-html/khiv-tree-plot-1.png | Bin 35420 -> 35248 bytes articles/rintchron.html | 355 ++++++++++-------- authors.html | 157 +++----- index.html | 153 ++++---- news/index.html | 157 ++------ pkgdown.css | 83 ++-- pkgdown.js | 4 +- pkgdown.yml | 6 +- reference/index.html | 215 ++--------- reference/intchron.html | 251 +++++-------- reference/intchron_crawl.html | 181 +++------ reference/intchron_extract.html | 209 ++++------- reference/intchron_hosts.html | 274 +++++--------- reference/intchron_request.html | 302 ++++++--------- reference/intchron_tabulate.html | 223 ++++------- reference/intchron_url.html | 206 ++++------ reference/pipe.html | 134 ++----- reference/read_intchron_delim.html | 195 +++------- reference/rintchron-package.html | 155 ++------ sitemap.xml | 33 +- 26 files changed, 1333 insertions(+), 2595 deletions(-) diff --git a/404.html b/404.html index d144d40..99ad16b 100644 --- a/404.html +++ b/404.html @@ -1,77 +1,37 @@ - - - - + + + + - Page not found (404) • rintchron - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + - + + + + - - - -
-
- + +
+ + + - - -
+
+
-
+ + - - diff --git a/CNAME b/CNAME index 113a555..71ef8f0 100644 --- a/CNAME +++ b/CNAME @@ -1 +1 @@ -rintchron.joeroe.io \ No newline at end of file +rintchron.joeroe.io diff --git a/LICENSE-text.html b/LICENSE-text.html index 3f51db0..f0099d6 100644 --- a/LICENSE-text.html +++ b/LICENSE-text.html @@ -1,77 +1,12 @@ - - - - - - - -License • rintchron - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -License • rintchron - + + - - - -
-
- -
- -
+
+
-
- - + + diff --git a/LICENSE.html b/LICENSE.html index b21dee3..78b69ef 100644 --- a/LICENSE.html +++ b/LICENSE.html @@ -1,77 +1,12 @@ - - - - - - - -MIT License • rintchron - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -MIT License • rintchron - + + - - - -
-
- -
- -
+
+
-
- - + + diff --git a/articles/index.html b/articles/index.html index 3cbdf88..3cd2b48 100644 --- a/articles/index.html +++ b/articles/index.html @@ -1,77 +1,12 @@ - - - - - - - -Articles • rintchron - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Articles • rintchron - + + - - - -
-
- -
- -
+
+
IntChron API
+
+
Basic usage
+
+
-
- - + + diff --git a/articles/intchron_api.html b/articles/intchron_api.html index 805fd73..0135da4 100644 --- a/articles/intchron_api.html +++ b/articles/intchron_api.html @@ -26,9 +26,11 @@ + + +
+
@@ -106,29 +102,62 @@

IntChron API

-

This vignette introduces low-level functions for interacting with IntChron’s API directly. In most cases, the high-level interface provided by intchron() should be sufficient; see vignette("intchron").

-
-

-Constructing requests to IntChron

+library("rintchron")
+

This vignette introduces low-level functions for interacting with +IntChron’s API directly. In most cases, the high-level interface +provided by intchron() should be sufficient; see +vignette("intchron").

+
+

Constructing requests to IntChron +

-
-

-Crawling the IntChron record tree

-

IntChron’s records are organised into a hierarchical tree by data source (‘host’), country, and individual data series (typically a site). For example, the canonical URLs for records from the site of Kharaneh IV (<https://intchron.org/record/oxa/Jordan/Kharaneh IV> and <https://intchron.org/record/nrcf/Jordan/Kharaneh IV>) encode their position in the tree:

-
#> Loading required package: ggplot2
+
+

Crawling the IntChron record tree +

+

IntChron’s records are organised into a hierarchical tree by data +source (‘host’), country, and individual data series (typically a site). +For example, the canonical URLs for records from the site of Kharaneh IV +(<https://intchron.org/record/oxa/Jordan/Kharaneh IV> +and <https://intchron.org/record/nrcf/Jordan/Kharaneh IV>) +encode their position in the tree:

+
#> Loading required package: ggplot2
+#> Warning: Using the `size` aesthetic in this geom was deprecated in ggplot2 3.4.0.
+#>  Please use `linewidth` in the `default_aes` field and elsewhere instead.
+#> This warning is displayed once every 8 hours.
+#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
+#> generated.

-

Here we can distinguish between ‘data’ records and ‘index’ records. Data records include a data series (such as a list of radiocarbon dates) and are found at the terminal nodes of the tree. Index records are the intermediate nodes in the tree and do not contain a data series, only a list of links to other records. For example, the index record at record/oxa/Jordan (https://intchron.org/record/oxa/Jordan) has a list of all the sites from Jordan in the ORAU database.

-

There are other index records, such as host/oxa and record/Jordan, but these are aliases that eventually redirect to the canonical hierarchy described above.

-

What this means is that if you want to aggregate multiple records, whether a specific subset (e.g. records from Kharaneh IV, records from Jordan), or the whole database, you cannot rely on a single request. Instead, you need to ‘crawl’ the tree from an index node to the data nodes you’re interested in.

-

The intchron_crawl() function provides this functionality. Starting from a given index record, it will recursively follow all the links it finds until it reaches the ends of the tree, and return all the data records it finds there. For example, you can retrieve the entire IntChron database by crawling the whole tree from the record entry point:

+

Here we can distinguish between ‘data’ records and ‘index’ records. +Data records include a data series (such as a list of radiocarbon dates) +and are found at the terminal nodes of the tree. Index records are the +intermediate nodes in the tree and do not contain a data series, only a +list of links to other records. For example, the index record at +record/oxa/Jordan (https://intchron.org/record/oxa/Jordan) has a list of +all the sites from Jordan in the ORAU database.

+

There are other index records, such as host/oxa and +record/Jordan, but these are aliases that eventually +redirect to the canonical hierarchy described above.

+

What this means is that if you want to aggregate multiple records, +whether a specific subset (e.g. records from Kharaneh IV, records from +Jordan), or the whole database, you cannot rely on a single request. +Instead, you need to ‘crawl’ the tree from an index node to the data +nodes you’re interested in.

+

The intchron_crawl() function provides this +functionality. Starting from a given index record, it will recursively +follow all the links it finds until it reaches the ends of the tree, and +return all the data records it finds there. For example, you can +retrieve the entire IntChron database by crawling the whole tree from +the record entry point:

-# Takes a long time!
-everything <- intchron_crawl(intchron_url("record"))
-

The remaining arguments to intchron_crawl() give options for refining this search with two common objectives in mind:

+# Takes a long time! +everything <- intchron_crawl(intchron_url("record"))
+

The remaining arguments to intchron_crawl() give options +for refining this search with two common objectives in mind:

    -
  1. Crawling the tree to retrieve a whole subset, but with certain types of records excluded.
  2. -
  3. Crawling the tree to find records matching a specific search pattern.
  4. +
  5. Crawling the tree to retrieve a whole subset, but with certain types +of records excluded.
  6. +
  7. Crawling the tree to find records matching a specific search +pattern.
+ + +
+
-

IntChron is an indexing service for chronological data such as radiocarbon dates (Bronk Ramsey et al. 2019). It specifies a standard exchange format and provides a consistent API for querying databases that use its schema. The rintchron package provides a simple interface for querying these databases with intchron(), explained in this vignette.

-

The package also includes low level functions for interacting with the IntChron API directly, described in vignette("intchron-api").

+

IntChron is an indexing service +for chronological data such as radiocarbon dates (Bronk Ramsey et al. 2019). It specifies a +standard exchange format and provides a consistent API for querying +databases that use its schema. The rintchron package provides a simple +interface for querying these databases with intchron(), +explained in this vignette.

+

The package also includes low level functions for interacting with +the IntChron API directly, described in +vignette("intchron-api").

-
-

-Querying IntChron

-

Use intchron() to query databases indexed by IntChron. At a minimum, you will need to specify which databases or ‘hosts’ you want to query.1 Use intchron_hosts() to see a list of currently available databases:

+library("rintchron")
+
+

Querying IntChron +

+

Use intchron() to query databases indexed by IntChron. +At a minimum, you will need to specify which databases or ‘hosts’ you +want to query.1 Use intchron_hosts() to see a +list of currently available databases:

-intchron_hosts()
-#> # A tibble: 5 x 2
-#>   host     database                            
-#>   <chr>    <chr>                               
-#> 1 egyptdb  Egyptian Radiocarbon Database       
-#> 2 intimate INTIMATE Database                   
-#> 3 nrcf     NERC Radiocarbon Facility (Oxford)  
-#> 4 oxa      Oxford Radiocarbon Accelerator Unit 
-#> 5 sadb     Southern Africa Radiocarbon Database
-

The first argument to intchron() should be a the ‘host’ code of the database you want to query, or a vector of hosts to query more than one (e.g. intchron(hosts = c("oxa", "nrcf"))). For example, to return the entire South Africa Radiocarbon Database (‘sadb’):

+intchron_hosts() +#> # A tibble: 6 × 2 +#> host database +#> <chr> <chr> +#> 1 egyptdb Egyptian Radiocarbon Database +#> 2 intimate INTIMATE Database +#> 3 nrcf NERC Radiocarbon Facility (Oxford) +#> 4 oxa Oxford Radiocarbon Accelerator Unit +#> 5 sadb Southern Africa Radiocarbon Database +#> 6 intcal20 IntCal20 archive
+

The first argument to intchron() should be a the ‘host’ +code of the database you want to query, or a vector of hosts to query +more than one (e.g. intchron(hosts = c("oxa", "nrcf"))). +For example, to return the entire South Africa Radiocarbon Database +(‘sadb’):

-intchron("sadb")
-#> # A tibble: 2,575 x 24
-#>    record_site record_country record_name record_longitude record_latitude
-#>    <chr>       <chr>          <chr>                  <dbl>           <dbl>
-#>  1 Basinghall  Botswana       Basinghall              27.1           -23.5
-#>  2 Basinghall  Botswana       Basinghall              27.1           -23.5
-#>  3 Basinghall  Botswana       Basinghall              27.1           -23.5
-#>  4 Basinghall  Botswana       Basinghall              27.1           -23.5
-#>  5 Basinghall  Botswana       Basinghall              27.1           -23.5
-#>  6 Basinghall  Botswana       Basinghall              27.1           -23.5
-#>  7 Bisoli      Botswana       Bisoli                  27.6           -21.0
-#>  8 Bisoli      Botswana       Bisoli                  27.6           -21.0
-#>  9 Bobonong R… Botswana       Bobonong R…             28.8           -22.2
-#> 10 Bosutswe    Botswana       Bosutswe                26.6           -22.0
-#> # … with 2,565 more rows, and 19 more variables: series_type <chr>,
-#> #   labcode <chr>, country <chr>, region <chr>, longitude <dbl>,
-#> #   latitude <dbl>, site <chr>, sample <chr>, material <chr>, species <chr>,
-#> #   d13C <dbl>, r_date <int>, r_date_sigma <int>, qual <chr>,
-#> #   environment <chr>, context <chr>, period <chr>, subperiod <chr>, refs <chr>
-

You can further refine your query by specifying the locations you are interested in with the countries and sites parameters. Like hosts, these can also accept a vector of locations. For example, to download records from Jordan in the ORAU (oxa) and NERC-RF (nrcf) databases:

+intchron("sadb") +#> # A tibble: 2,565 × 36 +#> record_environment record_site_context record_z_type record_z_basis +#> <chr> <chr> <lgl> <lgl> +#> 1 Savanna Biome settlement NA NA +#> 2 Savanna Biome settlement NA NA +#> 3 Savanna Biome settlement NA NA +#> 4 Savanna Biome settlement NA NA +#> 5 Savanna Biome settlement NA NA +#> 6 Savanna Biome settlement NA NA +#> 7 NA settlement NA NA +#> 8 NA settlement NA NA +#> 9 Savanna Biome settlement NA NA +#> 10 Desert Biome settlement NA NA +#> # ℹ 2,555 more rows +#> # ℹ 32 more variables: record_z_units <lgl>, record_t_source <lgl>, +#> # record_suppress_t <lgl>, record_suppress_z <lgl>, +#> # record_record_comment <chr>, record_site <chr>, record_country <chr>, +#> # record_region <chr>, record_latitude <dbl>, record_longitude <dbl>, +#> # record_elevation <lgl>, record_name <chr>, record_site_type <chr>, +#> # record_color <chr>, series_type <chr>, t <dbl>, t_sigma <dbl>, …
+

You can further refine your query by specifying the locations you are +interested in with the countries and sites +parameters. Like hosts, these can also accept a vector of +locations. For example, to download records from Jordan in the ORAU +(oxa) and NERC-RF (nrcf) databases:

-jordan <- intchron(c("oxa", "nrcf"), countries = "Jordan")
-jordan
-#> # A tibble: 156 x 19
-#>    record_site record_country record_name record_longitude record_latitude
-#>    <chr>       <chr>          <chr>                  <dbl>           <dbl>
-#>  1 Araq ed-Du… Jordan         Araq ed-Du…             32.3            35.7
-#>  2 Ayn Qasiyah Jordan         Ayn Qasiyah             36.8            31.8
-#>  3 Ayn Qasiyah Jordan         Ayn Qasiyah             36.8            31.8
-#>  4 Ayn Qasiyah Jordan         Ayn Qasiyah             36.8            31.8
-#>  5 Ayn Qasiyah Jordan         Ayn Qasiyah             36.8            31.8
-#>  6 Ayn Qasiyah Jordan         Ayn Qasiyah             36.8            31.8
-#>  7 Azraq 31    Jordan         Azraq 31                36.8            31.8
-#>  8 Azraq 31    Jordan         Azraq 31                36.8            31.8
-#>  9 Azraq 31    Jordan         Azraq 31                36.8            31.8
-#> 10 Burqu' 02   Jordan         Burqu' 02               37.8            32.7
-#> # … with 146 more rows, and 14 more variables: series_type <chr>,
-#> #   labcode <chr>, longitude <dbl>, latitude <dbl>, sample <chr>,
-#> #   material <chr>, species <chr>, d13C <dbl>, r_date <int>,
-#> #   r_date_sigma <int>, qual <chr>, F14C <dbl>, F14C_sigma <dbl>, refs <chr>
-

Use intchron_countries() to get a list of available countries on IntChron:

+jordan <- intchron(c("oxa", "nrcf"), countries = "Jordan") +jordan +#> # A tibble: 156 × 19 +#> record_site record_country record_name record_longitude record_latitude +#> <chr> <chr> <chr> <dbl> <dbl> +#> 1 Araq ed-Dubb Jordan Araq ed-Dubb 32.3 35.7 +#> 2 Ayn Qasiyah Jordan Ayn Qasiyah 36.8 31.8 +#> 3 Ayn Qasiyah Jordan Ayn Qasiyah 36.8 31.8 +#> 4 Ayn Qasiyah Jordan Ayn Qasiyah 36.8 31.8 +#> 5 Ayn Qasiyah Jordan Ayn Qasiyah 36.8 31.8 +#> 6 Ayn Qasiyah Jordan Ayn Qasiyah 36.8 31.8 +#> 7 Azraq 31 Jordan Azraq 31 36.8 31.8 +#> 8 Azraq 31 Jordan Azraq 31 36.8 31.8 +#> 9 Azraq 31 Jordan Azraq 31 36.8 31.8 +#> 10 Burqu' 02 Jordan Burqu' 02 37.8 32.7 +#> # ℹ 146 more rows +#> # ℹ 14 more variables: series_type <chr>, labcode <chr>, longitude <dbl>, +#> # latitude <dbl>, sample <chr>, material <chr>, species <chr>, d13C <dbl>, +#> # r_date <int>, r_date_sigma <int>, qual <chr>, F14C <dbl>, F14C_sigma <dbl>, +#> # refs <chr>
+

Use intchron_countries() to get a list of available +countries on IntChron:

-intchron_countries()
-#> # A tibble: 109 x 1
-#>    country   
-#>    <chr>     
-#>  1 Albania   
-#>  2 Algeria   
-#>  3 Andorra   
-#>  4 Angola    
-#>  5 Antarctica
-#>  6 Argentina 
-#>  7 Armenia   
-#>  8 Australia 
-#>  9 Austria   
-#> 10 Bahrain   
-#> # … with 99 more rows
+intchron_countries() +#> # A tibble: 117 × 1 +#> country +#> <chr> +#> 1 Albania +#> 2 Algeria +#> 3 Andorra +#> 4 Angola +#> 5 Antarctica +#> 6 Argentina +#> 7 Armenia +#> 8 Australia +#> 9 Austria +#> 10 Bahamas +#> # ℹ 107 more rows

Or in specific databases:

-intchron_countries(c("intimate", "egyptdb"))
-#> # A tibble: 13 x 2
-#>    host     country                
-#>    <chr>    <chr>                  
-#>  1 intimate ""                     
-#>  2 intimate "France"               
-#>  3 intimate "Greenland"            
-#>  4 intimate "Ireland"              
-#>  5 intimate "Italy"                
-#>  6 intimate "Norway"               
-#>  7 intimate "Romania"              
-#>  8 intimate "Slovenia"             
-#>  9 intimate "Switzerland"          
-#> 10 intimate "UK"                   
-#> 11 egyptdb  "Egypt"                
-#> 12 egyptdb  "Palestinian Territory"
-#> 13 egyptdb  "Sudan"
+intchron_countries(c("intimate", "egyptdb")) +#> # A tibble: 13 × 2 +#> host country +#> <chr> <chr> +#> 1 intimate "" +#> 2 intimate "France" +#> 3 intimate "Greenland" +#> 4 intimate "Ireland" +#> 5 intimate "Italy" +#> 6 intimate "Norway" +#> 7 intimate "Romania" +#> 8 intimate "Slovenia" +#> 9 intimate "Switzerland" +#> 10 intimate "UK" +#> 11 egyptdb "Egypt" +#> 12 egyptdb "Palestinian Territory" +#> 13 egyptdb "Sudan"
-
-

-Working with IntChron records

-

With the default setting tabulate = TRUE, intchron() returns a table of records, ready for you to use in your analysis:

+
+

Working with IntChron records +

+

With the default setting tabulate = TRUE, +intchron() returns a table of records, ready for you to use +in your analysis:

-library("dplyr", warn.conflicts = FALSE)
-
-# Summarise radiocarbon dates available from sites in Jordan
-jordan %>% 
-  distinct(labcode, .keep_all = TRUE) %>% 
-  group_by(record_site) %>% 
-  summarise(n_dates = n(), .groups = "drop_last")
-#> # A tibble: 20 x 2
-#>    record_site            n_dates
-#>  * <chr>                    <int>
-#>  1 Araq ed-Dubb                 1
-#>  2 Ayn Qasiyah                  5
-#>  3 Azraq 31                     3
-#>  4 Burqu' 02                    1
-#>  5 Burqu' 03                    1
-#>  6 Burqu' 27                    3
-#>  7 Burqu' 35                    3
-#>  8 Dahikiya, Badia Region       2
-#>  9 Dhuweila                     4
-#> 10 Kharaneh IV                  7
-#> 11 Shuna Project               22
-#> 12 Tell Abu Al-Kharaz          18
-#> 13 Tell Abu en-Niaj             3
-#> 14 Tell el-Hayyat               4
-#> 15 Tell el-Hibr                 1
-#> 16 Tell Hesban                  1
-#> 17 Wadi Jilat                  11
-#> 18 Wadi Jilat 13                1
-#> 19 Wadi Jilat 22                2
-#> 20 Wadi Jilat 25                1
-

Note the use of distinct(labcode) above. The data from IntChron usually requires some cleaning; for example, the ORAU and NERC-RF databases contain many duplicate radiocarbon dates. The c14bazAAR package (Schmid, Seidensticker, and Hinz 2019) includes many useful functions for tidying radiocarbon data.

-

You may find the stratigraphr and rcarbon (Crema and Bevan 2020) packages useful for further analysis of radiocarbon dates in R.

-

In some situations you might want to access the full records returned by IntChron. Setting tabulate = FALSE will return the raw JSON responses as a named list. See vignette("intchron-api") for some tips on how to work with these objects.

+library("dplyr", warn.conflicts = FALSE) + +# Summarise radiocarbon dates available from sites in Jordan +jordan %>% + distinct(labcode, .keep_all = TRUE) %>% + group_by(record_site) %>% + summarise(n_dates = n(), .groups = "drop_last") +#> # A tibble: 20 × 2 +#> record_site n_dates +#> <chr> <int> +#> 1 Araq ed-Dubb 1 +#> 2 Ayn Qasiyah 5 +#> 3 Azraq 31 3 +#> 4 Burqu' 02 1 +#> 5 Burqu' 03 1 +#> 6 Burqu' 27 3 +#> 7 Burqu' 35 3 +#> 8 Dahikiya, Badia Region 2 +#> 9 Dhuweila 4 +#> 10 Kharaneh IV 7 +#> 11 Shuna Project 22 +#> 12 Tell Abu Al-Kharaz 18 +#> 13 Tell Abu en-Niaj 3 +#> 14 Tell Hesban 1 +#> 15 Tell el-Hayyat 4 +#> 16 Tell el-Hibr 1 +#> 17 Wadi Jilat 11 +#> 18 Wadi Jilat 13 1 +#> 19 Wadi Jilat 22 2 +#> 20 Wadi Jilat 25 1
+

Note the use of distinct(labcode) above. The data from +IntChron usually requires some cleaning; for example, the ORAU and +NERC-RF databases contain many duplicate radiocarbon dates. The c14bazAAR package (Schmid, Seidensticker, and Hinz 2019) includes +many useful functions for tidying radiocarbon data.

+

You may find the stratigraphr and rcarbon (Crema and Bevan 2020) packages useful for +further analysis of radiocarbon dates in R.

+

In some situations you might want to access the full records returned +by IntChron. Setting tabulate = FALSE will return the raw +JSON responses as a named list. See +vignette("intchron-api") for some tips on how to work with +these objects.

-
-

-References

-
-
-

Bronk Ramsey, Christopher, Maarten Blaauw, Rebecca Kearney, and Staff, Richard A Staff. 2019. “The Importance of Open Access to Chronological Information: The IntChron Initiative.” Radiocarbon 61 (5): 1–11. https://doi.org/10.1017/RDC.2019.21.

+
+

References +

+
+
+Bronk Ramsey, Christopher, Maarten Blaauw, Rebecca Kearney, and Staff, +Richard A Staff. 2019. “The Importance of Open Access to +Chronological Information: The IntChron Initiative.” +Radiocarbon 61 (5): 1–11. https://doi.org/10.1017/RDC.2019.21.
-
-

Crema, Enrico R, and Andrew Bevan. 2020. “Inference from Large Sets of Radiocarbon Dates: Software and Methods.” Radiocarbon, 1–17. https://doi.org/10.1017/RDC.2020.95.

+
+Crema, Enrico R, and Andrew Bevan. 2020. “Inference from Large +Sets of Radiocarbon Dates: Software and Methods.” +Radiocarbon, 1–17. https://doi.org/10.1017/RDC.2020.95.
-
-

Schmid, Clemens, Dirk Seidensticker, and Martin Hinz. 2019. “c14bazAAR: An R Package for Downloading and Preparing C14 Dates from Different Source Databases.” Journal of Open Source Software 4 (43): 1914. https://doi.org/10.21105/joss.01914.

+
+Schmid, Clemens, Dirk Seidensticker, and Martin Hinz. 2019. c14bazAAR: An R Package for +Downloading and Preparing C14 Dates from Different Source +Databases.” Journal of Open Source Software 4 (43): +1914. https://doi.org/10.21105/joss.01914.
-
+

    -
  1. There are several reasons for this. First and foremost, it reduces the number of requests a given query has to make to the IntChron API. Querying all hosts isn’t usually necessary because IntChron indexes different types of database (e.g. radiocarbon dates from ORAU, palaeoclimate records from INTIMATE) which are rarely combined in a single analysis. Also, since IntChron is an indexing service, it is designed to include more databases over time, meaning analysis code that is not explicit about which hosts it needs is likely to break or at least become much less efficient in the future. But if you do need to, you can query all hosts by setting host = "all".↩︎

  2. +
  3. There are several reasons for this. First and foremost, +it reduces the number of requests a given query has to make to the +IntChron API. Querying all hosts isn’t usually necessary because +IntChron indexes different types of database (e.g. radiocarbon dates +from ORAU, palaeoclimate records from INTIMATE) which are rarely +combined in a single analysis. Also, since IntChron is an indexing +service, it is designed to include more databases over time, meaning +analysis code that is not explicit about which hosts it needs is likely +to break or at least become much less efficient in the future. But if +you do need to, you can query all hosts by setting +host = "all".↩︎

@@ -275,11 +322,13 @@

@@ -288,5 +337,7 @@

+ + diff --git a/authors.html b/authors.html index 33b7f80..bd6fb66 100644 --- a/authors.html +++ b/authors.html @@ -1,77 +1,12 @@ - - - - - - - -Authors • rintchron - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Authors and Citation • rintchron - - - - + + - -
-
-
- -
+
- @@ -152,22 +91,20 @@

Authors

-
- - + + diff --git a/index.html b/index.html index 8add51f..ef1fff4 100644 --- a/index.html +++ b/index.html @@ -26,9 +26,11 @@ + + +
-
-
@@ -202,5 +209,7 @@

Dev status

+ + diff --git a/news/index.html b/news/index.html index 5fdb4db..5146667 100644 --- a/news/index.html +++ b/news/index.html @@ -1,77 +1,12 @@ - - - - - - - -Changelog • rintchron - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Changelog • rintchron + + - - - - -
-
- -
- -
+
-
-

-rintchron 0.1.0

+
+

Initial release, including:

-
+
+
-
- - + + diff --git a/pkgdown.css b/pkgdown.css index 1273238..80ea5b8 100644 --- a/pkgdown.css +++ b/pkgdown.css @@ -56,8 +56,10 @@ img.icon { float: right; } -img { +/* Ensure in-page images don't run outside their container */ +.contents img { max-width: 100%; + height: auto; } /* Fix bug in bootstrap (only seen in firefox) */ @@ -78,11 +80,10 @@ dd { /* Section anchors ---------------------------------*/ a.anchor { - margin-left: -30px; - display:inline-block; - width: 30px; - height: 30px; - visibility: hidden; + display: none; + margin-left: 5px; + width: 20px; + height: 20px; background-image: url(./link.svg); background-repeat: no-repeat; @@ -90,17 +91,15 @@ a.anchor { background-position: center center; } -.hasAnchor:hover a.anchor { - visibility: visible; -} - -@media (max-width: 767px) { - .hasAnchor:hover a.anchor { - visibility: hidden; - } +h1:hover .anchor, +h2:hover .anchor, +h3:hover .anchor, +h4:hover .anchor, +h5:hover .anchor, +h6:hover .anchor { + display: inline-block; } - /* Fixes for fixed navbar --------------------------*/ .contents h1, .contents h2, .contents h3, .contents h4 { @@ -264,31 +263,26 @@ table { /* Syntax highlighting ---------------------------------------------------- */ -pre { - word-wrap: normal; - word-break: normal; - border: 1px solid #eee; -} - -pre, code { +pre, code, pre code { background-color: #f8f8f8; color: #333; } +pre, pre code { + white-space: pre-wrap; + word-break: break-all; + overflow-wrap: break-word; +} -pre code { - overflow: auto; - word-wrap: normal; - white-space: pre; +pre { + border: 1px solid #eee; } -pre .img { +pre .img, pre .r-plt { margin: 5px 0; } -pre .img img { +pre .img img, pre .r-plt img { background-color: #fff; - display: block; - height: auto; } code a, pre a { @@ -305,9 +299,8 @@ a.sourceLine:hover { .kw {color: #264D66;} /* keyword */ .co {color: #888888;} /* comment */ -.message { color: black; font-weight: bolder;} -.error { color: orange; font-weight: bolder;} -.warning { color: #6A0366; font-weight: bolder;} +.error {font-weight: bolder;} +.warning {font-weight: bolder;} /* Clipboard --------------------------*/ @@ -365,3 +358,27 @@ mark { content: ""; } } + +/* Section anchors --------------------------------- + Added in pandoc 2.11: https://github.com/jgm/pandoc-templates/commit/9904bf71 +*/ + +div.csl-bib-body { } +div.csl-entry { + clear: both; +} +.hanging-indent div.csl-entry { + margin-left:2em; + text-indent:-2em; +} +div.csl-left-margin { + min-width:2em; + float:left; +} +div.csl-right-inline { + margin-left:2em; + padding-left:1em; +} +div.csl-indent { + margin-left: 2em; +} diff --git a/pkgdown.js b/pkgdown.js index 7e7048f..6f0eee4 100644 --- a/pkgdown.js +++ b/pkgdown.js @@ -80,7 +80,7 @@ $(document).ready(function() { var copyButton = ""; - $(".examples, div.sourceCode").addClass("hasCopyButton"); + $("div.sourceCode").addClass("hasCopyButton"); // Insert copy buttons: $(copyButton).prependTo(".hasCopyButton"); @@ -91,7 +91,7 @@ // Initialize clipboard: var clipboardBtnCopies = new ClipboardJS('[data-clipboard-copy]', { text: function(trigger) { - return trigger.parentNode.textContent; + return trigger.parentNode.textContent.replace(/\n#>[^\n]*/g, ""); } }); diff --git a/pkgdown.yml b/pkgdown.yml index 9841f74..5cfd2c3 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -1,10 +1,10 @@ -pandoc: 2.7.3 -pkgdown: 1.6.1 +pandoc: 2.19.2 +pkgdown: 2.0.7 pkgdown_sha: ~ articles: intchron_api: intchron_api.html rintchron: rintchron.html -last_built: 2021-01-20T16:32Z +last_built: 2023-07-26T06:31Z urls: reference: https://rintchron.joeroe.io/reference article: https://rintchron.joeroe.io/articles diff --git a/reference/index.html b/reference/index.html index f7f1a6a..572f205 100644 --- a/reference/index.html +++ b/reference/index.html @@ -1,77 +1,12 @@ - - - - - - - -Function reference • rintchron - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Function reference • rintchron - - + + - - -
-
- -
- -
+
- - - - - - - - - - -
-

Query IntChron

-

High-level functions for querying databases indexed by IntChron.

+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+

Query IntChron

+

High-level functions for querying databases indexed by IntChron.

+

intchron()

Query IntChron

+

intchron_hosts() intchron_countries()

List available databases and countries on IntChron

-

Read and write

-

Functions for reading and writing data in IntChron’s file formats.

+
+

Read and write

+

Functions for reading and writing data in IntChron’s file formats.

+

read_intchron_delim() read_intchron_csv() read_intchron_tsv() read_intchron_txt()

Read a delimited file exported from IntChron

-

IntChron API

-

Low-level functions for interacting with the IntChron API directly.

+
+

IntChron API

+

Low-level functions for interacting with the IntChron API directly.

+

intchron_crawl()

Recursively retrieve IntChron records

+

intchron_extract()

Extract an element from an IntChron record

+

intchron_request()

Request records from IntChron

+

intchron_tabulate()

Extract a data frame from IntChron responses

+

intchron_url()

Construct the address of IntChron resources

- +
+
-
- - + + diff --git a/reference/intchron.html b/reference/intchron.html index 5b8ba93..5febd6e 100644 --- a/reference/intchron.html +++ b/reference/intchron.html @@ -1,80 +1,14 @@ - - - - - - - -Query IntChron — intchron • rintchron - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Query IntChron — intchron • rintchron - - - - - - - - - - - - - - - + + - - -
-
- -
- -
+
@@ -150,88 +69,92 @@

Query IntChron

optionally filtering by country and/or site.

-
intchron(hosts, countries = NA, sites = NA, tabulate = TRUE)
- -

Arguments

- - - - - - - - - - - - - - - - - - -
hosts

Vector of databases to be retrieved, or "all".

countries

(Optional) Vector of countries to be retrieved.

sites

(Optional) Vector of sites to be retrieved.

tabulate

If TRUE (the default), the data retrieved will be combined -into a data frame. Set FALSE to get the raw data from IntChron.

- -

Value

- -

A tibble, or if tabulate = FALSE, a list, of IntChron responses.

-

Details

- -

At least hosts must be specified. Use intchron_hosts() to get a list of +

+
intchron(hosts, countries = NA, sites = NA, tabulate = TRUE)
+
+ +
+

Arguments

+
hosts
+

Vector of databases to be retrieved, or "all".

+ + +
countries
+

(Optional) Vector of countries to be retrieved.

+ + +
sites
+

(Optional) Vector of sites to be retrieved.

+ + +
tabulate
+

If TRUE (the default), the data retrieved will be combined +into a data frame. Set FALSE to get the raw data from IntChron.

+ +
+
+

Value

+ + +

A tibble, or if tabulate = FALSE, a list, of IntChron responses.

+
+
+

Details

+

At least hosts must be specified. Use intchron_hosts() to get a list of currently available hosts, or "all" to retrieve data from any database.

-

See vignette("rintchron") for further details.

-

See also

- -

Other functions for querying IntChron: -intchron_hosts()

- -

Examples

-
# Get data from Jordan from the ORAU and NERC databases -intchron(c("oxa", "nrcf"), countries = "Jordan") -
#> # A tibble: 156 x 19 -#> record_site record_country record_name record_longitude record_latitude -#> <chr> <chr> <chr> <dbl> <dbl> -#> 1 Araq ed-Du… Jordan Araq ed-Du… 32.3 35.7 -#> 2 Ayn Qasiyah Jordan Ayn Qasiyah 36.8 31.8 -#> 3 Ayn Qasiyah Jordan Ayn Qasiyah 36.8 31.8 -#> 4 Ayn Qasiyah Jordan Ayn Qasiyah 36.8 31.8 -#> 5 Ayn Qasiyah Jordan Ayn Qasiyah 36.8 31.8 -#> 6 Ayn Qasiyah Jordan Ayn Qasiyah 36.8 31.8 -#> 7 Azraq 31 Jordan Azraq 31 36.8 31.8 -#> 8 Azraq 31 Jordan Azraq 31 36.8 31.8 -#> 9 Azraq 31 Jordan Azraq 31 36.8 31.8 -#> 10 Burqu' 02 Jordan Burqu' 02 37.8 32.7 -#> # … with 146 more rows, and 14 more variables: series_type <chr>, -#> # labcode <chr>, longitude <dbl>, latitude <dbl>, sample <chr>, -#> # material <chr>, species <chr>, d13C <dbl>, r_date <int>, -#> # r_date_sigma <int>, qual <chr>, F14C <dbl>, F14C_sigma <dbl>, refs <chr>
+

See vignette("rintchron") for further details.

+
+
+

See also

+

Other functions for querying IntChron: +intchron_hosts()

+
+ +
+

Examples

+
# Get data from Jordan from the ORAU and NERC databases
+intchron(c("oxa", "nrcf"), countries = "Jordan")
+#> # A tibble: 156 × 19
+#>    record_site  record_country record_name  record_longitude record_latitude
+#>    <chr>        <chr>          <chr>                   <dbl>           <dbl>
+#>  1 Araq ed-Dubb Jordan         Araq ed-Dubb             32.3            35.7
+#>  2 Ayn Qasiyah  Jordan         Ayn Qasiyah              36.8            31.8
+#>  3 Ayn Qasiyah  Jordan         Ayn Qasiyah              36.8            31.8
+#>  4 Ayn Qasiyah  Jordan         Ayn Qasiyah              36.8            31.8
+#>  5 Ayn Qasiyah  Jordan         Ayn Qasiyah              36.8            31.8
+#>  6 Ayn Qasiyah  Jordan         Ayn Qasiyah              36.8            31.8
+#>  7 Azraq 31     Jordan         Azraq 31                 36.8            31.8
+#>  8 Azraq 31     Jordan         Azraq 31                 36.8            31.8
+#>  9 Azraq 31     Jordan         Azraq 31                 36.8            31.8
+#> 10 Burqu' 02    Jordan         Burqu' 02                37.8            32.7
+#> # ℹ 146 more rows
+#> # ℹ 14 more variables: series_type <chr>, labcode <chr>, longitude <dbl>,
+#> #   latitude <dbl>, sample <chr>, material <chr>, species <chr>, d13C <dbl>,
+#> #   r_date <int>, r_date_sigma <int>, qual <chr>, F14C <dbl>, F14C_sigma <dbl>,
+#> #   refs <chr>
+
+
+
-
- - + + diff --git a/reference/intchron_crawl.html b/reference/intchron_crawl.html index ef3a704..e69e378 100644 --- a/reference/intchron_crawl.html +++ b/reference/intchron_crawl.html @@ -1,80 +1,14 @@ - - - - - - - -Recursively retrieve IntChron records — intchron_crawl • rintchron - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Recursively retrieve IntChron records — intchron_crawl • rintchron - - - - - - - - - - - - - + + - - - - -
-
- -
- -
+
@@ -150,61 +69,61 @@

Recursively retrieve IntChron records

The ignore parameter can be used to refine the search.

-
intchron_crawl(url, ignore = NA)
+
+
intchron_crawl(url, ignore = NA)
+
+ +
+

Arguments

+
url
+

Address of the record to start crawling from.

-

Arguments

- - - - - - - - - - -
url

Address of the record to start crawling from.

ignore

Vector of names of branches that should be ignored.

-

Value

+
ignore
+

Vector of names of branches that should be ignored.

-

A list of responses from IntChron.

-

Details

+
+
+

Value

+ +

A list of responses from IntChron.

+
+
+

Details

See vignette("intchron-api") for a detailed explanation of the structure of the IntChron record tree and the crawling algorithm used.

-

See also

- -

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

+
+
+

See also

+

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

+
+
-
- - + + diff --git a/reference/intchron_extract.html b/reference/intchron_extract.html index 5521768..7b4ea67 100644 --- a/reference/intchron_extract.html +++ b/reference/intchron_extract.html @@ -1,80 +1,14 @@ - - - - - - - -Extract an element from an IntChron record — intchron_extract • rintchron - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Extract an element from an IntChron record — intchron_extract • rintchron - - - - - - - - - - - - - - - + + - - -
-
- -
- -
+

Requests to IntChron return JSON responses that are mapped to a complex -nested list by jsonlite::fromJSON(). This convenience function provides +nested list by jsonlite::fromJSON(). This convenience function provides access to specific named elements of those objects.

-
intchron_extract(x, what)
- -

Arguments

- - - - - - - - - - -
x

List of IntChron records from intchron_request().

what

Element to extract: 'data_url', 'records', or 'file_data'.

- -

Value

- -

what from x.

-

See also

- -

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

- -

Examples

-
khiv <- intchron_request(intchron_url("record", c("oxa", "nrcf"), "Jordan", "Kharaneh IV")) -intchron_extract(khiv, "data_url") -
#> $`record/oxa/Jordan/Kharaneh IV` -#> [1] "https://c14.arch.ox.ac.uk/database/public.php?record=Jordan/Kharaneh+IV" -#> -#> $`record/nrcf/Jordan/Kharaneh IV` -#> [1] "https://c14.arch.ox.ac.uk/database/public.php?record=Jordan/Kharaneh+IV" -#>
+
+
intchron_extract(x, what)
+
+ +
+

Arguments

+
x
+

List of IntChron records from intchron_request().

+ + +
what
+

Element to extract: 'data_url', 'records', or 'file_data'.

+ +
+
+

Value

+ + +

what from x.

+
+
+

See also

+

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

+
+ +
+

Examples

+
khiv <- intchron_request(intchron_url("record", c("oxa", "nrcf"), "Jordan", "Kharaneh IV"))
+intchron_extract(khiv, "data_url")
+#> $`record/oxa/Jordan/Kharaneh IV`
+#> [1] "https://c14.arch.ox.ac.uk/database/public.php?record=Jordan/Kharaneh+IV"
+#> 
+#> $`record/nrcf/Jordan/Kharaneh IV`
+#> [1] "https://c14.arch.ox.ac.uk/database/public.php?record=Jordan/Kharaneh+IV"
+#> 
+
+
+
-
- - + + diff --git a/reference/intchron_hosts.html b/reference/intchron_hosts.html index 92c19fa..d6a348f 100644 --- a/reference/intchron_hosts.html +++ b/reference/intchron_hosts.html @@ -1,79 +1,13 @@ - - - - - - - -List available databases and countries on IntChron — intchron_hosts • rintchron - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -List available databases and countries on IntChron — intchron_hosts • rintchron - + + - - - -
-
- -
- -
+
@@ -148,98 +67,103 @@

List available databases and countries on IntChron

countries (optionally filtering by host).

-
intchron_hosts()
-
-intchron_countries(hosts = NA)
- -

Arguments

- - - - - - -
hosts

Vector of databases to query (for list of available countries). -Leave NA to list countries from all hosts.

- -

Value

- -

A tibble of available hosts or countries.

-

See also

- -

Other functions for querying IntChron: -intchron()

- -

Examples

-
# List available hosts -intchron_hosts() -
#> # A tibble: 5 x 2 -#> host database -#> <chr> <chr> -#> 1 egyptdb Egyptian Radiocarbon Database -#> 2 intimate INTIMATE Database -#> 3 nrcf NERC Radiocarbon Facility (Oxford) -#> 4 oxa Oxford Radiocarbon Accelerator Unit -#> 5 sadb Southern Africa Radiocarbon Database
-# List available countries -intchron_countries() -
#> # A tibble: 109 x 1 -#> country -#> <chr> -#> 1 Albania -#> 2 Algeria -#> 3 Andorra -#> 4 Angola -#> 5 Antarctica -#> 6 Argentina -#> 7 Armenia -#> 8 Australia -#> 9 Austria -#> 10 Bahrain -#> # … with 99 more rows
-# List available countries for specific hosts -intchron_countries(c("intimate", "egyptdb")) -
#> # A tibble: 13 x 2 -#> host country -#> <chr> <chr> -#> 1 intimate "" -#> 2 intimate "France" -#> 3 intimate "Greenland" -#> 4 intimate "Ireland" -#> 5 intimate "Italy" -#> 6 intimate "Norway" -#> 7 intimate "Romania" -#> 8 intimate "Slovenia" -#> 9 intimate "Switzerland" -#> 10 intimate "UK" -#> 11 egyptdb "Egypt" -#> 12 egyptdb "Palestinian Territory" -#> 13 egyptdb "Sudan"
+
+
intchron_hosts()
+
+intchron_countries(hosts = NA)
+
+ +
+

Arguments

+
hosts
+

Vector of databases to query (for list of available countries). +Leave NA to list countries from all hosts.

+ +
+
+

Value

+ + +

A tibble of available hosts or countries.

+
+
+

See also

+

Other functions for querying IntChron: +intchron()

+
+ +
+

Examples

+
# List available hosts
+intchron_hosts()
+#> # A tibble: 6 × 2
+#>   host     database                            
+#>   <chr>    <chr>                               
+#> 1 egyptdb  Egyptian Radiocarbon Database       
+#> 2 intimate INTIMATE Database                   
+#> 3 nrcf     NERC Radiocarbon Facility (Oxford)  
+#> 4 oxa      Oxford Radiocarbon Accelerator Unit 
+#> 5 sadb     Southern Africa Radiocarbon Database
+#> 6 intcal20 IntCal20 archive                    
+
+# List available countries
+intchron_countries()
+#> # A tibble: 117 × 1
+#>    country   
+#>    <chr>     
+#>  1 Albania   
+#>  2 Algeria   
+#>  3 Andorra   
+#>  4 Angola    
+#>  5 Antarctica
+#>  6 Argentina 
+#>  7 Armenia   
+#>  8 Australia 
+#>  9 Austria   
+#> 10 Bahamas   
+#> # ℹ 107 more rows
+
+# List available countries for specific hosts
+intchron_countries(c("intimate", "egyptdb"))
+#> # A tibble: 13 × 2
+#>    host     country                
+#>    <chr>    <chr>                  
+#>  1 intimate ""                     
+#>  2 intimate "France"               
+#>  3 intimate "Greenland"            
+#>  4 intimate "Ireland"              
+#>  5 intimate "Italy"                
+#>  6 intimate "Norway"               
+#>  7 intimate "Romania"              
+#>  8 intimate "Slovenia"             
+#>  9 intimate "Switzerland"          
+#> 10 intimate "UK"                   
+#> 11 egyptdb  "Egypt"                
+#> 12 egyptdb  "Palestinian Territory"
+#> 13 egyptdb  "Sudan"                
+
+
+
-
- - + + diff --git a/reference/intchron_request.html b/reference/intchron_request.html index db82b13..77947c5 100644 --- a/reference/intchron_request.html +++ b/reference/intchron_request.html @@ -1,79 +1,13 @@ - - - - - - - -Request records from IntChron — intchron_request • rintchron - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Request records from IntChron — intchron_request • rintchron - + + - - - -
-
- -
- -
+
@@ -148,123 +67,126 @@

Request records from IntChron

named list.

-
intchron_request(url, strict = FALSE)
+
+
intchron_request(url, strict = FALSE)
+
+ +
+

Arguments

+
url
+

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

-

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

+
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.

-

A list of parsed responses.

-

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()

+
+
+

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] "2020-09-18T10:03:40+00:00" -#> -#> $`record/oxa/Jordan/Dhuweila`$compilation$retrieved -#> [1] "2021-01-20T16:32:48+00:00" -#> -#> -#>
+
+

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:31:39+01:00"
+#> 
+#> 
+#> 
+
+
+
-
- - + + diff --git a/reference/intchron_tabulate.html b/reference/intchron_tabulate.html index f99fc36..dcb6a06 100644 --- a/reference/intchron_tabulate.html +++ b/reference/intchron_tabulate.html @@ -1,79 +1,13 @@ - - - - - - - -Extract a data frame from IntChron responses — intchron_tabulate • rintchron - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Extract a data frame from IntChron responses — intchron_tabulate • rintchron - - + + - - -
-
- -
- -
+
@@ -148,79 +67,81 @@

Extract a data frame from IntChron responses

series and associated metadata as a data frame.

-
intchron_tabulate(x)
+
+
intchron_tabulate(x)
+
-

Arguments

- - - - - - -
x

A list of IntChron responses.

+
+

Arguments

+
x
+

A list of IntChron responses.

-

Value

+
+
+

Value

+ -

A tibble combining the data from all responses. Bibliographic references +

A tibble combining the data from all responses. Bibliographic references are returned as a list column containing a vector of citation keys (ref: or doi:) for each record.

-

See also

- -

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

- -

Examples

-
khiv <- intchron_request(intchron_url("record", c("oxa", "nrcf"), "Jordan", "Kharaneh IV")) -intchron_tabulate(khiv) -
#> # A tibble: 14 x 19 -#> record_site record_country record_name record_longitude record_latitude -#> <chr> <chr> <chr> <dbl> <dbl> -#> 1 Kharaneh IV Jordan Kharaneh IV 36.5 31.7 -#> 2 Kharaneh IV Jordan Kharaneh IV 36.5 31.7 -#> 3 Kharaneh IV Jordan Kharaneh IV 36.5 31.7 -#> 4 Kharaneh IV Jordan Kharaneh IV 36.5 31.7 -#> 5 Kharaneh IV Jordan Kharaneh IV 36.5 31.7 -#> 6 Kharaneh IV Jordan Kharaneh IV 36.5 31.7 -#> 7 Kharaneh IV Jordan Kharaneh IV 36.5 31.7 -#> 8 Kharaneh IV Jordan Kharaneh IV 36.5 31.7 -#> 9 Kharaneh IV Jordan Kharaneh IV 36.5 31.7 -#> 10 Kharaneh IV Jordan Kharaneh IV 36.5 31.7 -#> 11 Kharaneh IV Jordan Kharaneh IV 36.5 31.7 -#> 12 Kharaneh IV Jordan Kharaneh IV 36.5 31.7 -#> 13 Kharaneh IV Jordan Kharaneh IV 36.5 31.7 -#> 14 Kharaneh IV Jordan Kharaneh IV 36.5 31.7 -#> # … with 14 more variables: series_type <chr>, labcode <chr>, longitude <dbl>, -#> # latitude <dbl>, sample <chr>, material <chr>, species <chr>, d13C <dbl>, -#> # r_date <int>, r_date_sigma <int>, qual <chr>, F14C <dbl>, F14C_sigma <dbl>, -#> # refs <chr>
+
+
+

See also

+

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

+
+ +
+

Examples

+
khiv <- intchron_request(intchron_url("record", c("oxa", "nrcf"), "Jordan", "Kharaneh IV"))
+intchron_tabulate(khiv)
+#> # A tibble: 14 × 19
+#>    record_site record_country record_name record_longitude record_latitude
+#>    <chr>       <chr>          <chr>                  <dbl>           <dbl>
+#>  1 Kharaneh IV Jordan         Kharaneh IV             36.5            31.7
+#>  2 Kharaneh IV Jordan         Kharaneh IV             36.5            31.7
+#>  3 Kharaneh IV Jordan         Kharaneh IV             36.5            31.7
+#>  4 Kharaneh IV Jordan         Kharaneh IV             36.5            31.7
+#>  5 Kharaneh IV Jordan         Kharaneh IV             36.5            31.7
+#>  6 Kharaneh IV Jordan         Kharaneh IV             36.5            31.7
+#>  7 Kharaneh IV Jordan         Kharaneh IV             36.5            31.7
+#>  8 Kharaneh IV Jordan         Kharaneh IV             36.5            31.7
+#>  9 Kharaneh IV Jordan         Kharaneh IV             36.5            31.7
+#> 10 Kharaneh IV Jordan         Kharaneh IV             36.5            31.7
+#> 11 Kharaneh IV Jordan         Kharaneh IV             36.5            31.7
+#> 12 Kharaneh IV Jordan         Kharaneh IV             36.5            31.7
+#> 13 Kharaneh IV Jordan         Kharaneh IV             36.5            31.7
+#> 14 Kharaneh IV Jordan         Kharaneh IV             36.5            31.7
+#> # ℹ 14 more variables: series_type <chr>, labcode <chr>, longitude <dbl>,
+#> #   latitude <dbl>, sample <chr>, material <chr>, species <chr>, d13C <dbl>,
+#> #   r_date <int>, r_date_sigma <int>, qual <chr>, F14C <dbl>, F14C_sigma <dbl>,
+#> #   refs <chr>
+
+
+
-
- - + + diff --git a/reference/intchron_url.html b/reference/intchron_url.html index a9d3260..5425bac 100644 --- a/reference/intchron_url.html +++ b/reference/intchron_url.html @@ -1,79 +1,13 @@ - - - - - - - -Construct the address of IntChron resources — intchron_url • rintchron - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Construct the address of IntChron resources — intchron_url • rintchron - - + + - - -
-
- -
- -
+
@@ -148,65 +67,68 @@

Construct the address of IntChron resources

or resources into a properly encoded URL.

-
intchron_url(..., intchron_root = "https://intchron.org")
- -

Arguments

- - - - - - - - - - -
...

Character vectors describing the path to the resource or resources.

intchron_root

Root address of IntChron.

- -

Value

- -

Character vector of URLs.

-

See also

- -

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

- -

Examples

-
# One resource -intchron_url("record", "oxa", "Jordan", "Dhuweila") -
#> [1] "https://intchron.org/record/oxa/Jordan/Dhuweila"
-# Multiple resources -intchron_url("record", c("oxa", "nrcf"), "Jordan", "Kharaneh IV") -
#> [1] "https://intchron.org/record/oxa/Jordan/Kharaneh IV" -#> [2] "https://intchron.org/record/nrcf/Jordan/Kharaneh IV"
+
+
intchron_url(..., intchron_root = "https://intchron.org")
+
+ +
+

Arguments

+
...
+

Character vectors describing the path to the resource or resources.

+ + +
intchron_root
+

Root address of IntChron.

+ +
+
+

Value

+ + +

Character vector of URLs.

+
+
+

See also

+

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

+
+ +
+

Examples

+
# One resource
+intchron_url("record", "oxa", "Jordan", "Dhuweila")
+#> [1] "https://intchron.org/record/oxa/Jordan/Dhuweila"
+
+# Multiple resources
+intchron_url("record", c("oxa", "nrcf"), "Jordan", "Kharaneh IV")
+#> [1] "https://intchron.org/record/oxa/Jordan/Kharaneh IV" 
+#> [2] "https://intchron.org/record/nrcf/Jordan/Kharaneh IV"
+
+
+
-
- - + + diff --git a/reference/pipe.html b/reference/pipe.html index ac6ac3a..f5bf992 100644 --- a/reference/pipe.html +++ b/reference/pipe.html @@ -1,78 +1,12 @@ - - - - - - - -Pipe operator — %>% • rintchron - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Pipe operator — %>% • rintchron - - + + - - -
-
- -
- -
+
@@ -146,35 +65,32 @@

Pipe operator

See magrittr::%>% for details.

-
lhs %>% rhs
- +
+
lhs %>% rhs
+
+
-

- - + + diff --git a/reference/read_intchron_delim.html b/reference/read_intchron_delim.html index e9dbc35..18cfbec 100644 --- a/reference/read_intchron_delim.html +++ b/reference/read_intchron_delim.html @@ -1,86 +1,20 @@ - - - - - - - -Read a delimited file exported from IntChron — read_intchron_delim • rintchron - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Read a delimited file exported from IntChron — read_intchron_delim • rintchron + + - - - - -
-
- -
- -
+
@@ -154,81 +73,79 @@

Read a delimited file exported from IntChron

Reads records in the CSV and TXT (TSV) formats exported by by IntChron. These are regular comma- and tab-delimited files with a few elements of non-standard formatting that mean they cannot be directly parsed by generic -functions such as read.delim() or readr::read_delim() (see details).

+functions such as read.delim() or readr::read_delim() (see details).

read_intchron_csv() and read_intchron_tsv()/read_intchron_txt() are convenience aliases for read_intchron_delim(file, delim = ",") and read_intchron_delim(file, delim = "\t") respectively.

It is usually more robust to retrieve data from IntChron in JSON format using -intchron() or intchron_request().

+intchron() or intchron_request().

-
read_intchron_delim(file, delim = c(",", "\t"))
+    
+
read_intchron_delim(file, delim = c(",", "\t"))
+
+read_intchron_csv(file)
+
+read_intchron_tsv(file)
+
+read_intchron_txt(file)
+
-read_intchron_csv(file) +
+

Arguments

+
file
+

Records from IntChron in .csv or .txt format. Can be either a +path to a downloaded file or a URL (with or without the file extension).

-read_intchron_tsv(file) -read_intchron_txt(file)
+
delim
+

Character used separate columns in the record data. Either "," +for CSV or "\t" (a tab character) for TXT/TSV.

-

Arguments

- - - - - - - - - - -
file

Records from IntChron in .csv or .txt format. Can be either a -path to a downloaded file or a URL (with or without the file extension).

delim

Character used separate columns in the record data. Either "," -for CSV or "\t" (a tab character) for TXT/TSV.

+
+
+

Value

+ -

Value

+

A tibble containing the data from the record.

-

A tibble containing the data from the record.

-

Associated metadata is discarded.

-

Details

+

Associated metadata is discarded.

+
+
+

Details

Delimited files exported from IntChron have the following non-standard -formatting:

    -
  • Comment lines are denoted with '#' and contain metadata before and after +formatting:

    • Comment lines are denoted with '#' and contain metadata before and after the table of data itself.

    • The comment line immediately above the data contains the column headings

    • A variable number of empty columns occur at the beginning of rows

    • A trailing delimiter occurs at the end of every row except the header

    • Missing values may be coded as: "", "-"

    • -
    - -

    Beyond this, some data tables are malformed (e.g. they contain unmatched +

Beyond this, some data tables are malformed (e.g. they contain unmatched quotes) and cannot be parsed.

+
+
-
- - + + diff --git a/reference/rintchron-package.html b/reference/rintchron-package.html index 97a490f..3eb56f2 100644 --- a/reference/rintchron-package.html +++ b/reference/rintchron-package.html @@ -1,83 +1,17 @@ - - - - - - - -rintchron: Interface to IntChron — rintchron-package • rintchron - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -rintchron: Interface to IntChron — rintchron-package • rintchron - - - - - - - - - - - - - + + - - - - -
-
- -
- -
+
@@ -157,45 +76,39 @@

rintchron: Interface to IntChron

- -

See also

- - -

Author

- -

Maintainer: Joe Roe joe@joeroe.io (ORCID)

+ +
+

Author

+

Maintainer: Joe Roe joe@joeroe.io (ORCID)

+
+
-
- - + + diff --git a/sitemap.xml b/sitemap.xml index cc0b0f4..32f11cc 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1,8 +1,35 @@ + + https://rintchron.joeroe.io/404.html + + + https://rintchron.joeroe.io/LICENSE-text.html + + + https://rintchron.joeroe.io/LICENSE.html + + + https://rintchron.joeroe.io/articles/index.html + + + https://rintchron.joeroe.io/articles/intchron_api.html + + + https://rintchron.joeroe.io/articles/rintchron.html + + + https://rintchron.joeroe.io/authors.html + https://rintchron.joeroe.io/index.html + + https://rintchron.joeroe.io/news/index.html + + + https://rintchron.joeroe.io/reference/index.html + https://rintchron.joeroe.io/reference/intchron.html @@ -33,10 +60,4 @@ https://rintchron.joeroe.io/reference/rintchron-package.html - - https://rintchron.joeroe.io/articles/intchron_api.html - - - https://rintchron.joeroe.io/articles/rintchron.html -