Skip to content

Commit

Permalink
added test, document datasets and functions
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenpp7 committed Feb 18, 2021
1 parent 94cfea2 commit 3ea5a02
Show file tree
Hide file tree
Showing 35 changed files with 253 additions and 544 deletions.
1 change: 1 addition & 0 deletions R/cum_dives.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#'
#' This function creates some visualizations of the number of dives along time including a density plot and a fitted model
#'
#' @param path directory location where the files will be read from or written into
#'
#' @author Ruben Perez Perez
#'
Expand Down
1 change: 1 addition & 0 deletions R/divecount_reg.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#'
#' This function creates a barplot to visualize the number of dives per region
#'
#' @param path directory location where the files will be read from or written into
#'
#' @author Ruben Perez Perez
#'
Expand Down
1 change: 1 addition & 0 deletions R/divesite_depths.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#'
#' @param toofew number of logged dives per divesite under which a divesite is excluded
#' from the boxplot for having too few dives for an appropriate interpretation of the depth variation
#' @param path directory location where the files will be read from or written into
#'
#' @author Ruben Perez Perez
#'
Expand Down
1 change: 1 addition & 0 deletions R/divetypes.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#' This function creates a barplot to visualize the number of dives types "Course Leading", "Course Assistance", etc.
#'
#' @param n.other number of dives under which a diveType is placed into the "Other" category.
#' @param path directory location where the files will be read from or written into
#'
#' @author Ruben Perez Perez
#'
Expand Down
2 changes: 2 additions & 0 deletions R/divetypes_platform.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#'
#' This function creates a barplot to visualize the number of dives per region and platform type "poolDive", "boatDive" or "shoreDive"
#'
#' @param path directory location where the files will be read from or written into
#'
#' @author Ruben Perez Perez
#'
#' @import ggplot2
Expand Down
1 change: 1 addition & 0 deletions R/logbook_highlights.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#' This function creates a data frame to have an overview of some highlights of the diving logbook
#' such as number of recorded dives, maximum bottom time or maximum depth
#'
#' @param path directory location where the files will be read from or written into
#'
#' @author Ruben Perez Perez
#'
Expand Down
1 change: 1 addition & 0 deletions R/logbook_map.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#' This function creates a leaflet map to visualize the geographical coverage of the logbook together with some information on each dive such as
#' Bottom Time, Max Depth, Date and Divesite
#'
#' @param path directory location where the files will be read from or written into
#'
#' @author Ruben Perez Perez
#'
Expand Down
1 change: 1 addition & 0 deletions R/logged_depths.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#' This function creates a scatterplot to visualize the maximum depths logged through time, offering a nice overview
#' of the diving experience regarding depth
#'
#' @param path directory location where the files will be read from or written into
#'
#' @author Ruben Perez Perez
#'
Expand Down
14 changes: 14 additions & 0 deletions R/scuba_cert.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#' Example of the certifications table
#'
#' A dataset containing an example of the certifications table, this table contains
#' an example of what the column names must be and how the content must look like.
#'
#' @format A data frame with 4 rows and 5 variables:
#' \describe{
#' \item{diverID}{the diver identifier linked to the certification}
#' \item{certificationName}{the name of the certification}
#' \item{certificationAgency}{the name or acronym of the agency that issued the certification}
#' \item{certificationDate}{the date when the certification was issued, in ISO8601}
#' \item{instructorID}{the diver identifier of the instructor who taught the course and issued the certification}
#' }
"scuba_cert"
39 changes: 39 additions & 0 deletions R/scuba_clean.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#' Example of the logbook table
#'
#' A dataset containing an example of the logbook table, this table contains
#' an example of what the column names must be and how the content must look like.
#'
#' @format A data frame with 500 rows and 30 variables:
#' \describe{
#' \item{eventDate}{the date of the dive, in ISO8601}
#' \item{locationID}{the name of the dive site}
#' \item{maximumDepthInMeters}{the maximum depth of the dive, in meters}
#' \item{bottomTime}{the bottom time of the dive, in minutes}
#' \item{waterTemperature}{the average water temperature of the dive, in degrees celsius}
#' \item{visibility}{the visibility during the dive, categorical not standardized yet}
#' \item{extraWeight}{weight of the weight belt, in kilograms}
#' \item{diveType}{main type of dive, categorical}
#' \item{diveType_2}{secondary type of dive, not necessary}
#' \item{diveType_3}{terciary type of dive, not necessary}
#' \item{stop}{safety or emergency or no stop, not necessary}
#' \item{deepDive}{not necessary}
#' \item{nightDive}{not necessary}
#' \item{sidemountDive}{not necessary}
#' \item{boatDive}{not necessary}
#' \item{shoreDive}{not necessary}
#' \item{driftDive}{not necessary}
#' \item{caveDive}{not necessary}
#' \item{wreckDive}{not necessary}
#' \item{eventID}{identifier of each dive}
#' \item{rowid}{number of row}
#' \item{locality}{place where the dive site is located, village or town}
#' \item{region}{region where the dive site is located}
#' \item{country}{region where the dive site is located}
#' \item{decimalLatitude}{latitude of the dive site, in decimal degrees}
#' \item{decimalLongitude}{longitude of the dive site, in decimal degrees}
#' \item{platformType}{the type of dive regarding the entry platform, shore, boat or pool}
#' \item{wreckType}{not necessary}
#' \item{caveType}{not necessary}
#' \item{diveClass}{main class of the dive, it groups several diveTypes into one diveClass, categorical}
#' }
"scuba_clean"
40 changes: 40 additions & 0 deletions R/scuba_map.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#' Example of the logbook table in sf format
#'
#' A dataset containing an example of the logbook table in sf format, this table contains
#' an example of what the column names must be and how the content must look like.
#'
#' @format A "simple feature" and data frame with 500 rows and 31 variables:
#' \describe{
#' \item{eventDate}{the date of the dive, in ISO8601}
#' \item{locationID}{the name of the dive site}
#' \item{maximumDepthInMeters}{the maximum depth of the dive, in meters}
#' \item{bottomTime}{the bottom time of the dive, in minutes}
#' \item{waterTemperature}{the average water temperature of the dive, in degrees celsius}
#' \item{visibility}{the visibility during the dive, categorical not standardized yet}
#' \item{extraWeight}{weight of the weight belt, in kilograms}
#' \item{diveType}{main type of dive, categorical}
#' \item{diveType_2}{secondary type of dive, not necessary}
#' \item{diveType_3}{terciary type of dive, not necessary}
#' \item{stop}{safety or emergency or no stop, not necessary}
#' \item{deepDive}{not necessary}
#' \item{nightDive}{not necessary}
#' \item{sidemountDive}{not necessary}
#' \item{boatDive}{not necessary}
#' \item{shoreDive}{not necessary}
#' \item{driftDive}{not necessary}
#' \item{caveDive}{not necessary}
#' \item{wreckDive}{not necessary}
#' \item{eventID}{identifier of each dive}
#' \item{rowid}{number of row}
#' \item{locality}{place where the dive site is located, village or town}
#' \item{region}{region where the dive site is located}
#' \item{country}{region where the dive site is located}
#' \item{decimalLatitude}{latitude of the dive site, in decimal degrees}
#' \item{decimalLongitude}{longitude of the dive site, in decimal degrees}
#' \item{platformType}{the type of dive regarding the entry platform, shore, boat or pool}
#' \item{wreckType}{not necessary}
#' \item{caveType}{not necessary}
#' \item{diveClass}{main class of the dive, it groups several diveTypes into one diveClass, categorical}
#' \item{geometry}{coordinates of the dive site in Points format}
#' }
"scuba_map"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions man/cum_dives.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/divecount_reg.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/divesite_depths.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/divetypes.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/divetypes_platform.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/logbook_highlights.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/logbook_map.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/logged_depths.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions man/scuba_cert.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 49 additions & 0 deletions man/scuba_clean.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 50 additions & 0 deletions man/scuba_map.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions test_data/certifications.csv

This file was deleted.

15 changes: 0 additions & 15 deletions test_data/coordinates.csv

This file was deleted.

Loading

0 comments on commit 3ea5a02

Please sign in to comment.