marinebon / p2p

Pole to Pole website
https://marinebon.github.io/p2p
3 stars 1 forks source link

p2p

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

make_pages_on_push make_sites_monthly

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.

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

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

So here's the usable URL:

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:

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

Resources