Skip to content

Commit

Permalink
parseOSD updates to use SKB sections
Browse files Browse the repository at this point in the history
  • Loading branch information
brownag committed Jul 3, 2021
1 parent 6d70a71 commit d4ed0d0
Show file tree
Hide file tree
Showing 3 changed files with 225 additions and 212 deletions.
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ importFrom(rvest,html_node)
importFrom(rvest,html_nodes)
importFrom(rvest,html_text)
importFrom(stats,aggregate)
importFrom(stringi,stri_detect_fixed)
importFrom(stringi,stri_enc_toascii)
importFrom(stringi,stri_match)
importFrom(stringi,stri_match_all)
importFrom(stringi,stri_trans_general)
importFrom(tibble,as_tibble)
importFrom(tools,file_ext)
Expand Down
10 changes: 5 additions & 5 deletions R/create_OSD.R
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,11 @@ osd_to_json <- function(logfile = file.path(output_dir, "OSD/OSD.log"),

x <- validateOSD(logfile, filepath)

typicalpedon <- .parseTypicalPedon(x[["TYPICAL PEDON"]])
parsed.OSD <- .doParseOSD(x)

# SPC-style components from parseOSD returned as nested data.frames in JSON
x$SITE <- I(list(parsed.OSD$`site-data`))
x$HORIZONS <- I(list(parsed.OSD$`hz-data`))

if (is.logical(x))
if (!x) return(FALSE)
Expand All @@ -392,7 +396,3 @@ osd_to_json <- function(logfile = file.path(output_dir, "OSD/OSD.log"),
names(res) <- all_osds
return(res)
}

.parseTypicalPedon <- function(section) {

}
Loading

0 comments on commit d4ed0d0

Please sign in to comment.