Skip to content

Commit

Permalink
update data model
Browse files Browse the repository at this point in the history
  • Loading branch information
rix133 committed Feb 14, 2024
1 parent abace41 commit 6696428
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: RDBEScore
Type: Package
Title: Functions for the ICES Regional Database and Estimation System (RDBES)
Version: 0.3.0
Version: 0.3.1
Author: c(
person(given = "David",
family = "Currie",
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# RDBEScore 0.3.1

* update to the latest RDBES data format (version 1.19.20)

# RDBEScore 0.3.0 - 20/11/2023

This version introduces a bunch of changes to the package. The updated behaviour is best explained in the vignettes. The main changes are:
Expand Down
Binary file modified data-raw/dataFormat/RDBES Data Model CL CE.xlsx
Binary file not shown.
Binary file modified data-raw/dataFormat/RDBES Data Model CS.xlsx
Binary file not shown.
Binary file modified data-raw/dataFormat/RDBES Data Model VD SL.xlsx
Binary file not shown.
23 changes: 12 additions & 11 deletions data-raw/getRDBESDataModelColumnNames.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,19 @@ if(nrow(mapColNamesFieldR[mapColNamesFieldR$Table.Prefix == "FT" & mapColNamesFi
mapColNamesFieldR[(ind+1):nrow(mapColNamesFieldR),])

}

# there is currently no hierarchy where LE directly preceeds SA (without SS) so this is not needed:
#this was a bug in the RDBES download part
# Similar fix to above for LEid in the SA table
if(nrow(mapColNamesFieldR[mapColNamesFieldR$Table.Prefix == "SA" & mapColNamesFieldR$Field.Name == "LEid",]) == 0) {
# this is the row after which the new row needs to be added
ind <- intersect(which(mapColNamesFieldR$Table.Prefix == "SA"),
which(mapColNamesFieldR$Field.Name == "SSid"))

mapColNamesFieldR <- rbind(mapColNamesFieldR[1:ind,],
c("SA", "LEid", "LEid", "Integer", "integer"),
mapColNamesFieldR[(ind+1):nrow(mapColNamesFieldR),])

}
#if(nrow(mapColNamesFieldR[mapColNamesFieldR$Table.Prefix == "SA" & mapColNamesFieldR$Field.Name == "LEid",]) == 0) {
# # this is the row after which the new row needs to be added
# ind <- intersect(which(mapColNamesFieldR$Table.Prefix == "SA"),
# which(mapColNamesFieldR$Field.Name == "SSid"))
#
# mapColNamesFieldR <- rbind(mapColNamesFieldR[1:ind,],
# c("SA", "LEid", "LEid", "Integer", "integer"),
# mapColNamesFieldR[(ind+1):nrow(mapColNamesFieldR),])
#
#}

# Another similar fix to above for FOid in the LE table
if(nrow(mapColNamesFieldR[mapColNamesFieldR$Table.Prefix == "LE" & mapColNamesFieldR$Field.Name == "FOid",]) == 0) {
Expand Down

0 comments on commit 6696428

Please sign in to comment.