Skip to content

repository for images and code to support biadwiki.org

License

Notifications You must be signed in to change notification settings

BIADcore/BIADwiki

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

BIAD

BIAD

Big Interdisciplinary Archaeological Database

This github repository supports the BIAD wiki biadwiki.org by providing a single collaborative repository to develop R code ONLY for maintaining the wiki.

Installation

To use the BIADwiki repository you may need to install some of the following packages, depending on which scripts you wish to run:

install.package(
    c("ADMUR", #to automatically compute date based on C14 sample and phases proximities
      "httr",#to send  files to wiki.js
      "gridExtra",
      "rnaturalearth",
      "DiagrammeRsvg",
      "DiagrammeR",  # exports some nice data trees 
      "ggplot2",
      "svglite",
      "maps",
      "mapdata",
      "terra", #this is for rnaturalearth
      "sf",
      "gt", # to export tables
      "rsvg"
     )
)

!!! note that I (simon) had to install some as sudo (thus doing sudo R, before install) because weirdly admin can't write in /tmp/ or whatever ; I don't understand anyway I couldn't compile stuff for SF so it failed, and same for TERRA, and same for FS & SASS, both some frontend stuff used by gt. very annoying this tmp problem, no time to solve it atm

These package needs some system wide dependencies:

 apt install libcurl4-openssl-dev \ #for diagrammeRsvg; god knows why they use that... 
             librsvg2 \  #for rsvg (I personnally vote to rewrite auto.make... to NOT USE diagrammeRsvg 
             libudunits2-dev  \ # for units, used by sf
             libgdal-dev libgeos-dev libproj-dev \ #these are also used by sf ;
             libmysqlclient-dev # needed that for libgdal-dev to install, why throwing conflict with mariadb

R scripts run only by the server

Various internal consistency checks, summary statistics and images are generated automatically from BIAD and used to populate the BIADwiki. These R scripts are prefaced 'auto.make.xxxxxx.R and run on the hosting server daily. A single bash script BIADwiki.sh is run by the server's crontab schedule. BIADwiki.sh invokes R to run a single R script controller.R. The R script controller.R runs the auto.make.xxx.R scripts. Login credentials for the local server are stored in the .Rprofile and therefore are automatically invoked when the server runs R in admin. These scripts will not work if you want to run them externally from the server as a standard user. To fix this issue it is necessary to first load the functions source("https://raw.githubusercontent.com/BIADwiki/BIADwiki/main/R/functions.R") and to replace the "query.database" function with "run.server.query(query.database(sql.command)".

About

repository for images and code to support biadwiki.org

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 8

Languages