R Getting JSON data into dataframe
问题 I have this file with JSON formatted data, but need this into a dataframe. Ultimately I would like to plot the geolocations onto a map, but can't seem to get this data into a df first. json_to_df <- function(file){ file <- lapply(file, function(x) { x[sapply(x, is.null)] <- NA unlist(x) }) df <- do.call("rbind", file) return(df) } But I get only this error: Error in fromJSON(file) : STRING_ELT() can only be applied to a 'character vector', not a 'list' The file structure looks like this (this