Skip to contents

Paths to Game of Thrones data as JSON and XML

Usage

got_chars_json()

got_chars_xml()

Value

Local path to JSON or XML file containing Game of Thrones data

See also

Other Game of Thrones data and functions: got_chars

Examples

got_chars_json()
#> [1] "/home/runner/work/_temp/Library/repurrrsive/extdata/got_chars.json"
if (require("jsonlite")) {
  gotcj <- fromJSON(got_chars_json(), simplifyDataFrame = FALSE)
  identical(got_chars, gotcj)
}
#> [1] TRUE
got_chars_xml()
#> [1] "/home/runner/work/_temp/Library/repurrrsive/extdata/got_chars.xml"
if (require("xml2")) {
  xml <- read_xml(got_chars_xml())
  xml
}
#> {xml_document}
#> <root>
#>  [1] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/1022</ur ...
#>  [2] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/1052</ur ...
#>  [3] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/1074</ur ...
#>  [4] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/1109</ur ...
#>  [5] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/1166</ur ...
#>  [6] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/1267</ur ...
#>  [7] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/1295</ur ...
#>  [8] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/130</url ...
#>  [9] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/1303</ur ...
#> [10] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/1319</ur ...
#> [11] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/148</url ...
#> [12] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/149</url ...
#> [13] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/150</url ...
#> [14] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/168</url ...
#> [15] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/2066</ur ...
#> [16] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/208</url ...
#> [17] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/216</url ...
#> [18] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/232</url ...
#> [19] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/238</url ...
#> [20] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/339</url ...
#> ...