Skip to content

marinebon/p2p

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

p2p

Marine Biodiversity Observation Network Pole to Pole of the Americas (MBON Pole to Pole) website

make_pages_on_push make_sites_monthly

  • make_pages_on_push: Make the normal web pages (*.Rmd to *.html; not sites z_*.html) when a new commit is pushed to this repo.
  • make_sites_monthly: Make all site pages (z_*.html from _site_template.Rmd) on the 7th day of the month, first downloading all the OBIS data within the unionized buffer boxes, then rendering each site page, including fetching the latest SST & Chl satellite products.

This website was built as an R Markdown website.

Add a Site

Add entry to data/sites.csv. Be sure to use a unique id. Please do not add more than 10 entries at a time. You can add a URL to the org and site name following this format: [org short ID](URL).

Then build site (or check into Github and Travis will build it for you). A new marker will be populated into the home page map via rmarkdown::render_site() rendering index.Rmd and a new site page will be generated via source("make_sites.R") (see make_sites.R)) rendering a parameterized Rmarkdown using _site_template.Rmd.

For notes about finding country given lat/lon (ie reverse geocoding), creating Google Maps URL (gmapurl; optional, not a necessary field), check out code in prep.R.

  • WARNING: If you change the coordinates of a site (ie lat/lon in sites.csv), please delete the associated site's file in data/sst, so the timeseries plot becomes representative of the data for that coordinate. Also, do not add more than 10 sites to the sites.csv at once to avoid Tracis CI to stop running due to time limit.

Add Pictures to a Site

Associate URL of a photo to id of a site in a new row into site_photos - Google Sheets.

To use a photo stored in Google Drive, right-click on the file > Get sharable link, for instance

  • sharable link: https://drive.google.com/open?id=18lW657Las2jUrDeA06nZ77Smd27Es_N3
    or
  • shareble link: https://drive.google.com/file/d/1luySMHkWAOi-inyhURmarcii_1fXfbmW/view?usp=sharing

And replace the beginning of the URL up to id= or /d/ with (also delete /view?usp=sharing):

  • http://drive.google.com/uc?export=view&id=

So here's the usable URL:

  • http://drive.google.com/uc?export=view&id=18lW657Las2jUrDeA06nZ77Smd27Es_N3
    or
  • http://drive.google.com/uc?export=view&id=1luySMHkWAOi-inyhURmarcii_1fXfbmW

The website will get rebuilt weekly (see travis-ci.org/marinebon/p2p/settings). If you want the website to rebuild sooner, simply make a modification to a file in the github site, like to the README.md, and commit the change to fire off a website rebuild with Travis: travis-ci.org/marinebon/p2p.

Photos are now stored in Enrique's GDrive and should eventually be moved to a dedicated drive.

Old info:

So far as a test, we only have some pics from these two sites:

Flickr seems to have the most options for tagging and creating albums or collections (ie BB's mbon-p2p | Flickr). You can also get the URL of a Flickr photo with a given size (eg "Medium (640 × 480)").

Building Website

Since making the site pages (z_*.html) is time consuming and the typical method for building an Rmarkdown website (rmarkdown::render_site(): *.Rmd -> *.html) deletes the output docs/ folder, these processes are broken up into two seperate scripts:

  • make_pages.R: renders the *.Rmd to *.html (not sites z_*.html)
  • make_sites.R: renders all site pages (z_*.html from _site_template.Rmd), first downloading all the OBIS data within the unionized buffer boxes, then rendering each site page, including fetching the latest SST & Chl satellite products

Note that you can run the corresponding workflows through the p2p Github Actions web interface:

Resources

Releases

No releases published

Packages

No packages published

Languages