GithubHelp home page GithubHelp logo

lucasjcc / sdsr Goto Github PK

View Code? Open in Web Editor NEW

This project forked from edzer/sdsr

0.0 0.0 0.0 267.63 MB

Spatial Data Science: With Applications in R

Home Page: https://r-spatial.org/book

License: Other

R 20.25% Awk 0.02% TeX 21.44% Makefile 0.30% HTML 57.40% Dockerfile 0.21% sed 0.39%

sdsr's Introduction

The print version of this book is available from CRC/Chapman and Hall. A complete online version of this book is available.

To recreate/reproduce this book:

  • git clone this repository
  • download the data used in Ch 13, and extract the contents of the aq subdirectory into sdsr/aq
  • install R package dependencies listed below
  • install quarto
  • run quarto render --to html

See also the Dockerfile; building the (18 Gb) image with

docker build . -t sdsr

and running it with

docker run -p 8787:8787 -e DISABLE_AUTH=true -ti --rm sdsr

will serve an Rstudio server instance on http://localhost:8787/, without authentication.

Compiling the whole book

After running the docker image and opening rstudio in the browser:

  • click on 01-hello.qmd in the bottom-right pane
  • click on the Render button of the top-left pane to compile the whole book

this should open a new browser window with the full book rendered (you may need to switch off popup blockers for localhost)

Running selected chunks

To run a selected code section, possibly after modification, find the selected code section in the corresponding .qmd file, and click the small green arrow symbols on the top-right corner of the code blocks:

  • to prepare, first click Run All Chunks Above,
  • to run a selected code chunk: click Run Current Chunk

Dependencies

To locally process the book, download (clone) this repository and install the following R packages from CRAN:

install.packages(c(
  "dbscan",
  "gstat",
  "hglm",
  "igraph",
  "lme4",
  "lmtest",
  "maps",
  "mapview",
  "matrixStats",
  "mgcv",
  "R2BayesX",
  "rgeoda",
  "rnaturalearth",
  "rnaturalearthdata",
  "sf",
  "spatialreg",
  "spdep",
  "spData",
  "stars",
  "tidyverse",
  "tmap"))

Install INLA:

install.packages("INLA", repos = c(getOption("repos"), INLA="https://inla.r-inla-download.org/R/stable"))

Install spDataLarge:

options(timeout = 600); install.packages("spDataLarge", repos = "https://nowosad.github.io/drat/",type = "source")

Install starsdata:

options(timeout = 1200); install.packages("starsdata", repos = "http://cran.uni-muenster.de/pebesma", type = "source")

Install spatialreg from source from github, either from source:

install.packages("remotes")
remotes::install_github("r-spatial/spatialreg")

or as binary from r-universe:

options(repos = c(
  rspatial = "https://r-spatial.r-universe.dev",
  CRAN = "https://cloud.r-project.org"))
install.packages(c("spatialreg"))

Daily rendered version on GA

The entire book is recreated from source nightly with the latest released R and all updated CRAN packages by a Github Action using this script. The online version thus rendered is found here. As this output is not checked daily it is not automatically copied to the "official" online version, at https://r-spatial.org/book/ .

Python version

A version "With Applications in R and Python" is under construction; the sources are in the python branch of this repository, a rendered online version is found at https://r-spatial.org/python/ .

sdsr's People

Contributors

edzer avatar rsbivand avatar nowosad avatar jonathom avatar jafro96 avatar singhkpratham avatar wibeasley avatar liuyadong avatar hurielreichel avatar kadyb avatar ppaccioretti avatar robinlovelace avatar syverpet avatar jonas-hurst avatar angela-li avatar alanguillaume avatar florisvdh avatar hansvancalster avatar ismailsunni avatar mikemahoney218 avatar andronaco avatar suriyahgit avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.