Convert json to data_frame. Extract data from json file downloaded from Estonian Health Statistics and Health Research database
json_to_df(json, tidy = FALSE)
json | A path to json file or json string, a character string. |
---|---|
tidy | Logical. Return data in wide or long (tidy) format, see Details. Defaults to FALSE. |
Returns data_frame in the long format.
Returns data in the wide format by default because retrieved data can contain data intermingled with summary data. When table is large, it might be more convenient and efficient to identify and remove rows with summary variables before converting table into long format.
path_to_PK10.json <- system.file("extdata", "PK10.json", package = "boulder", mustWork = TRUE) pk10 <- json_to_df(path_to_PK10.json)#>