提取JSON数据库

提取JSON数据库,json,xml,r,Json,Xml,R,我正在尝试从中检索数据,并与之关联 我似乎无法提取有关设施的任何有意义的数据,而且json文件似乎只是一个没有观察的描述 我正在尝试使用R包导入它。我试过JSON查看器。第一个链接中的文档页面似乎是XML格式的。要从该url获取数据,请执行以下操作: library(jsonlite) #install these if need be library(curl) my_dat <- fromJSON('http://catalog.data.gov/harvest/object/5630

我正在尝试从中检索数据,并与之关联

我似乎无法提取有关设施的任何有意义的数据,而且json文件似乎只是一个没有观察的描述


我正在尝试使用R包导入它。我试过JSON查看器。第一个链接中的文档页面似乎是XML格式的。

要从该url获取数据,请执行以下操作:

library(jsonlite) #install these if need be
library(curl)
my_dat <- fromJSON('http://catalog.data.gov/harvest/object/5630b80a-23dc-483f-8164-876dac1a9757')

如果这不是您期望的内容,那就是数据源的问题。但这是一种将JSON从URL摄取到R的方法。

很难理解您想要实现什么,但这可能会帮助您看到结构
jsonlite::fromJSON(“http://catalog.data.gov/harvest/object/5630b80a-23dc-483f-8164-876dac1a9757“
我认为您需要更多地了解API,而
R
部分将很简单。
> my_dat
$`@type`
[1] "dcat:Dataset"

$accessLevel
[1] "public"

$bureauCode
[1] "029:40"

$contactPoint
$contactPoint$`@type`
[1] "vcard:Contact"

$contactPoint$fn
[1] "Kevin Reid"

$contactPoint$hasEmail
[1] "mailto:vawebservices@med.va.gov"


$description
[1] "The facilities web service provides VA facility information. The VA facilities locator is a feature that is available across the enterprise, on any webpage, for the Department of Veterans Affairs. It is comprised of data from across the different facilities, and is updated multiple times a day by multiple personnel. This API gives external users the ability to interact with the most up to date information about VA facilities."

$distribution
              @type                                                   accessURL format                      title
1 dcat:Distribution http://www.va.gov/webservices/fandl/documentation/fandl.cfm    API VA Facilities & Leadership

$identifier
[1] "VA-OIT-WSG-01"

$keyword
[1] "Building Information" "Facilities"           "Location"             "VA"