Skip to content

Commit

Permalink
updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben Perez committed Nov 10, 2020
1 parent 6db58c5 commit d3f5dec
Show file tree
Hide file tree
Showing 4 changed files with 581 additions and 517 deletions.
13 changes: 13 additions & 0 deletions R/ideas_draft.R
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,16 @@
# label='This is a static label',
# labelOptions = labelOptions(noHide = T),
# icon = icon.fa)



# Plotly plots
#
# load("data/scuba_map.RData")
# library(plotly)
#
# fig <- plot_ly(data = scuba_map %>% filter (!is.na(maximumDepthInMeters)),
# x = ~as.Date(eventDate),
# y = ~-as.numeric(maximumDepthInMeters))
#
# fig
73 changes: 62 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,70 @@
# SCUBA logbook
# Divewatchr R package

The aim of this repository is the creation of a R package for a thorough visualization and exploration of a SCUBA Diving Logbook, including spatio-temporal and categorical plots and maps.


The following images shown here will seem incomplete because of the lack of high quality data in the dataset, for example, maximumDepthInMeters, locationID and bottomTime were not recorded for all the dives. This depends only on the database and not on the functions

## Installation

```r
install.packages("devtools")
devtools::install.github("rubenpp7/divewatchr")
library(divewatchr)

# Data load
prep_data()
```


```
eventDate maximumDepthInMeters bottomTime locationID locality region country decimalLatitude decimalLongitude platformType
1999-01-18 32.1 44 Tug 2 Exiles Sliema Malta 35.91933 14.498331 shoreDive
1999-01-24 31.3 32 Um El-Faroud Zurrieq Valley Qrendi Malta 35.81909 14.449771 shoreDive
1999-02-09 10.8 43 La Cueva de la Virgen Cabo de Cope Murcia Spain 37.42451 -1.500004 boatDive
1999-03-31 30.1 36 La Cueva de la Virgen Cabo de Cope Murcia Spain 37.42451 -1.500004 boatDive
1999-04-19 7.4 29 Pared Sur del Fraile Aguilas Murcia Spain 37.40743 -1.547101 shoreDive
1999-04-20 25.9 33 La Cueva de la Virgen Cabo de Cope Murcia Spain 37.42451 -1.500004 boatDive
```



The aim of this repository is the creation of maps and graphs to visualize a diving logbook.
Some plots will seem incomplete because of the lack of high quality data in the dataset, for example, maximumDepthInMeters, locationID and bottomTime were not recorded for all the dives.

## Dives distribution map

Access the interactive map here:
<a href="https://rubenpp7.github.io/" target="_blank">https://rubenpp7.github.io/</a> <i> open it in a new tab </i>
```r
logbook_map()


![distribution](images/logbook_map2.png)
```
![](images/logbook_map2.png)

***


## Logged dives depths

![logged_depths](images/logged_depths.png)

```r
logged depths()

```
![](images/logged_depths.png)

***


## Cumulative number of dives
I was pretty bored and couldn't get to do a nice simple cumulative with my crappy data so there you got and hard-to-understand fancy mega-plot.
Cumulative hard-to-understand fancy mega-plot.
<i> The blue vertical dashed lines mark the date when I completed my OWD, AOWD, Rescue and Divemaster courses </i>

![cum_dives](images/cum_dives.png)
```r
cum_dives()

```
![](images/cum_dives.png)

***
***
Expand All @@ -34,21 +73,33 @@ I was pretty bored and couldn't get to do a nice simple cumulative with my crapp

## Dives per country and region

![divecount_reg](images/divecount_reg.png)
```r
divecount_reg()

```
![](images/divecount_reg.png)

***


## Dive sites depths variation

![divesite_depths](images/divesite_depths.png)
```r
divesite_depths()

```
![](images/divesite_depths.png)

***


## Platform type dives

![divetypes](images/divetypes.png)
```r
divetypes_platform()

```
![](images/divetypes.png)

***

Expand Down
12 changes: 6 additions & 6 deletions test_data/coordinates.csv
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
"locationID","locality","region","country","decimalLatitude","decimalLongitude","platformType","wreckType","caveType"
"Piscina ZOEA","Aguilas","Murcia","Spain",37.39575,-1.599959,"shoreDive",,
"Piscina ZOEA","Aguilas","Murcia","Spain",37.39575,-1.599959,"poolDive",,
"Marina del Este","Almunecar","Granada","Spain",36.722489,-3.728296,"boatDive",,
"La Cueva de la Virgen","Cabo de Cope","Murcia","Spain",37.424511,-1.500004,"boatDive",,
"Chocolate Island","Chocolate Island","Central Visayas","Philippines",11.305414,124.064415,"boatDive",,
"Chocolate Island","Chocolate Island","Central Visayas","Philippines",11.305414,124.064415,"shoreDive",,
"Pared Sur del Fraile","Aguilas","Murcia","Spain",37.407431,-1.547101,"shoreDive",,
"Kalanggaman Island","Kalanggaman Island","Central Visayas","Philippines",11.11695,124.245713,"boatDive",,
"Kalanggaman Island","Kalanggaman Island","Central Visayas","Philippines",11.11695,124.245713,"poolDive",,
"Um El-Faroud","Zurrieq Valley","Qrendi","Malta",35.819086,14.449771,"shoreDive",,
"A catedral","Sagres","Algarve","Portugal",37.006141,-8.92733,"poolDive",,
"Praia do Martinhal","Sagres","Algarve","Portugal",37.018291,-8.925847,"poolDive",,
"Praia do Martinhal","Sagres","Algarve","Portugal",37.018291,-8.925847,"boatDive",,
"Exiles","Exiles","Sliema","Malta",35.918614,14.498422,"shoreDive",,
"Tug 2","Exiles","Sliema","Malta",35.919331,14.498331,"shoreDive",,
"HMS Maori","St Elmo Bay","Valletta","Malta",35.902885,14.51588,"boatDive",,
"HMS Maori","St Elmo Bay","Valletta","Malta",35.902885,14.51588,"shoreDive",,
"Dreischor gemaal","Grevelingenmeer","Zeeland","Netherlands",51.747398,3.89119,"shoreDive",,
"Oesterdam","Tholen","Zeeland","Netherlands",51.516707,4.17167,"shoreDive",,
"Oesterdam","Tholen","Zeeland","Netherlands",51.516707,4.17167,"boatDive",,
Loading

0 comments on commit d3f5dec

Please sign in to comment.