From 507648a069a2b42f1b7c4094fd1f6b6a80edfcb1 Mon Sep 17 00:00:00 2001 From: Pakillo Date: Wed, 18 Jan 2017 13:13:13 +0100 Subject: [PATCH] deleting old stuff --- GISwithR.Rmd | 234 ------- GISwithR.Rpres | 234 ------- GISwithR.html | 1201 ----------------------------------- GISwithR.md | 257 -------- images/CC-BY-NC-SA_logo.png | Bin 0 -> 1815 bytes 5 files changed, 1926 deletions(-) delete mode 100644 GISwithR.Rmd delete mode 100644 GISwithR.Rpres delete mode 100644 GISwithR.html delete mode 100644 GISwithR.md create mode 100644 images/CC-BY-NC-SA_logo.png diff --git a/GISwithR.Rmd b/GISwithR.Rmd deleted file mode 100644 index e975ab6..0000000 --- a/GISwithR.Rmd +++ /dev/null @@ -1,234 +0,0 @@ -GIS with R: slides for the unconverted -======================================================== -author: Francisco Rodriguez-Sanchez -date: @frod_san -2015-11-14 - - -R: not only for stats -===================== - -![](images/R.jpg) - - -R can make beautiful maps -========================= -type: section - - - -Made in R -========== - -![](images/bike_ggplot.png) - -http://spatial.ly/2012/02/great-maps-ggplot2/ - - -Made in R -========= - -![](images/facebook_map.png) - -http://paulbutler.org/archives/visualizing-facebook-friends/ - - -Made in R -========= - -![](images/airMadrid_stamen.png) - -http://oscarperpinan.github.io/spacetime-vis/ - - -Made in R -========= - -![](images/cft.png) - -http://oscarperpinan.github.io/spacetime-vis/ - - -Made in R -========= - -![](images/vLine.svg) - -http://oscarperpinan.github.io/spacetime-vis/ - - -And it's very easy! -=================== -type: section - - -Map species occurrences in 2 lines of code -========================================== - -```{r echo=FALSE} -library(knitr) -library(dismo) -data(acaule) -acaule <- acaule[acaule$continent == "South America", ] -acaule <- acaule[!is.na(acaule$lat) | !is.na(acaule$lon), ] -acaule <- subset(acaule, select = c("species", "lon", "lat")) -crs.geo <- CRS("+proj=longlat +ellps=WGS84 +datum=WGS84") -occs <- acaule -acaule.sp <- acaule -coordinates(acaule.sp) <- c("lon", "lat") -crs(acaule.sp) <- crs.geo -occdata <- Mercator(acaule.sp) -``` - -```{r fig.keep = "last"} -plot(gmap(occdata, type = "satellite")) -points(occdata, col = "red", pch=20, cex = 2) -``` - - - -Let's go step by step -===================== -type: section - - -A dataframe of species occurrences -================================== - -```{r echo=FALSE} -kable(head(occs)) -``` - - -Make it a spatial object -======================== - -```{r} -coordinates(occs) <- c("lon", "lat") -str(occs, 2) -``` - - -Specify projection (CRS) -======================== - -```{r} -crs(occs) <- CRS("+proj=longlat +ellps=WGS84 +datum=WGS84") -``` - -See http://spatialreference.org - - -Project to Mercator and plot -============================ - -```{r fig.keep = "last"} -plot(gmap(occs, type = "satellite")) -points(Mercator(occs), col = "red", pch = 20, cex = 2) -``` - - -Alternatively, load shapefile -============================= - -```{r echo = FALSE} -shapefile(occs, filename = "occs.shp", overwrite = TRUE) -``` - -```{r fig.keep = "last"} -occs <- shapefile("occs.shp") -plot(gmap(occs, type = "satellite")) -points(Mercator(occs), col = "red", pch = 20, cex = 2) -``` - - -Using ggmap -=========== - -```{r eval=TRUE} -library(ggmap) -map <- get_map(bbox(occs), maptype = "watercolor", source = "stamen") -ggmap(map) + - geom_point(aes(x = coords.x1, y = coords.x2), data = as.data.frame(coordinates(occs)), - colour = "red", size = 4) -``` - - -Raster data -=========== -type: section - - -Download elevation data -========================== - -```{r} -elevation <- getData("alt", country = "ESP") -``` - -```{r} -library(rasterVis) -levelplot(elevation) -``` - - - -Dynamic interactive maps with leaflet -===================================== - -```{r} -library(mapview) -mapView(occs) -``` - - - -Remote sensing growing fast -=========================== - -e.g. RStoolbox - -![](images/rstoolbox.png) - - -Doing GIS in R: main advantages -=============================== -incremental: true - -- Fully-reproducible scripts - -- **Harness all R stats power** - - - Data wrangling - - - Modelling - - - Dataviz - -- Easy! - - - - -Calling GIS from R -================== - -- Grass: [`spgrass6`](http://www.rdocumentation.org/packages/spgrass6) -- SAGA: [`RSAGA`](http://www.rdocumentation.org/packages/RSAGA) -- ArcGIS: https://github.com/R-ArcGIS -![](images/R_ArcGis.png) - -Includes calling R from ArcGIS too - - - - -To read more -============ - -http://pakillo.github.io/R-GIS-tutorial - - - - - diff --git a/GISwithR.Rpres b/GISwithR.Rpres deleted file mode 100644 index e975ab6..0000000 --- a/GISwithR.Rpres +++ /dev/null @@ -1,234 +0,0 @@ -GIS with R: slides for the unconverted -======================================================== -author: Francisco Rodriguez-Sanchez -date: @frod_san -2015-11-14 - - -R: not only for stats -===================== - -![](images/R.jpg) - - -R can make beautiful maps -========================= -type: section - - - -Made in R -========== - -![](images/bike_ggplot.png) - -http://spatial.ly/2012/02/great-maps-ggplot2/ - - -Made in R -========= - -![](images/facebook_map.png) - -http://paulbutler.org/archives/visualizing-facebook-friends/ - - -Made in R -========= - -![](images/airMadrid_stamen.png) - -http://oscarperpinan.github.io/spacetime-vis/ - - -Made in R -========= - -![](images/cft.png) - -http://oscarperpinan.github.io/spacetime-vis/ - - -Made in R -========= - -![](images/vLine.svg) - -http://oscarperpinan.github.io/spacetime-vis/ - - -And it's very easy! -=================== -type: section - - -Map species occurrences in 2 lines of code -========================================== - -```{r echo=FALSE} -library(knitr) -library(dismo) -data(acaule) -acaule <- acaule[acaule$continent == "South America", ] -acaule <- acaule[!is.na(acaule$lat) | !is.na(acaule$lon), ] -acaule <- subset(acaule, select = c("species", "lon", "lat")) -crs.geo <- CRS("+proj=longlat +ellps=WGS84 +datum=WGS84") -occs <- acaule -acaule.sp <- acaule -coordinates(acaule.sp) <- c("lon", "lat") -crs(acaule.sp) <- crs.geo -occdata <- Mercator(acaule.sp) -``` - -```{r fig.keep = "last"} -plot(gmap(occdata, type = "satellite")) -points(occdata, col = "red", pch=20, cex = 2) -``` - - - -Let's go step by step -===================== -type: section - - -A dataframe of species occurrences -================================== - -```{r echo=FALSE} -kable(head(occs)) -``` - - -Make it a spatial object -======================== - -```{r} -coordinates(occs) <- c("lon", "lat") -str(occs, 2) -``` - - -Specify projection (CRS) -======================== - -```{r} -crs(occs) <- CRS("+proj=longlat +ellps=WGS84 +datum=WGS84") -``` - -See http://spatialreference.org - - -Project to Mercator and plot -============================ - -```{r fig.keep = "last"} -plot(gmap(occs, type = "satellite")) -points(Mercator(occs), col = "red", pch = 20, cex = 2) -``` - - -Alternatively, load shapefile -============================= - -```{r echo = FALSE} -shapefile(occs, filename = "occs.shp", overwrite = TRUE) -``` - -```{r fig.keep = "last"} -occs <- shapefile("occs.shp") -plot(gmap(occs, type = "satellite")) -points(Mercator(occs), col = "red", pch = 20, cex = 2) -``` - - -Using ggmap -=========== - -```{r eval=TRUE} -library(ggmap) -map <- get_map(bbox(occs), maptype = "watercolor", source = "stamen") -ggmap(map) + - geom_point(aes(x = coords.x1, y = coords.x2), data = as.data.frame(coordinates(occs)), - colour = "red", size = 4) -``` - - -Raster data -=========== -type: section - - -Download elevation data -========================== - -```{r} -elevation <- getData("alt", country = "ESP") -``` - -```{r} -library(rasterVis) -levelplot(elevation) -``` - - - -Dynamic interactive maps with leaflet -===================================== - -```{r} -library(mapview) -mapView(occs) -``` - - - -Remote sensing growing fast -=========================== - -e.g. RStoolbox - -![](images/rstoolbox.png) - - -Doing GIS in R: main advantages -=============================== -incremental: true - -- Fully-reproducible scripts - -- **Harness all R stats power** - - - Data wrangling - - - Modelling - - - Dataviz - -- Easy! - - - - -Calling GIS from R -================== - -- Grass: [`spgrass6`](http://www.rdocumentation.org/packages/spgrass6) -- SAGA: [`RSAGA`](http://www.rdocumentation.org/packages/RSAGA) -- ArcGIS: https://github.com/R-ArcGIS -![](images/R_ArcGis.png) - -Includes calling R from ArcGIS too - - - - -To read more -============ - -http://pakillo.github.io/R-GIS-tutorial - - - - - diff --git a/GISwithR.html b/GISwithR.html deleted file mode 100644 index 316e094..0000000 --- a/GISwithR.html +++ /dev/null @@ -1,1201 +0,0 @@ - - - - - - GIS with R: slides for the unconverted - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-

GIS with R: slides for the unconverted

Francisco Rodriguez-Sanchez
@frod_san

- -
-

2015-11-14

- -
- -
-
-

R: not only for stats

-
-

- -
- -
-
-

R can make beautiful maps

-
- -
- -
-
-

Made in R

- - -
-
-

Made in R

- - -
-
-

Made in R

- - -
-
-

Made in R

- - -
-
-

Made in R

- - -
-
-

And it's very easy!

-
- -
- -
-
-

Map species occurrences in 2 lines of code

-
-
plot(gmap(occdata, type = "satellite"))
-points(occdata, col = "red", pch=20, cex = 2)
-
- -

plot of chunk unnamed-chunk-2

- -
- -
-
-

Let's go step by step

-
- -
- -
-
-

A dataframe of species occurrences

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
specieslonlat
1Solanum acaule Bitter-66.10-21.90
2Solanum acaule Bitter-71.00-13.50
52Solanum acaule Bitter-66.43-24.22
53Solanum acaule Bitter-72.07-13.35
54Solanum acaule Bitter-68.97-15.23
55Solanum acaule Bitter-64.95-17.75
- -
- -
-
-

Make it a spatial object

-
-
coordinates(occs) <- c("lon", "lat")
-str(occs, 2)
-
- -
Formal class 'SpatialPointsDataFrame' [package "sp"] with 5 slots
-  ..@ data       :'data.frame': 49 obs. of  1 variable:
-  ..@ coords.nrs : int [1:2] 2 3
-  ..@ coords     : num [1:49, 1:2] -66.1 -71 -66.4 -72.1 -69 ...
-  .. ..- attr(*, "dimnames")=List of 2
-  ..@ bbox       : num [1:2, 1:2] -72.5 -24.2 -64.7 -12.5
-  .. ..- attr(*, "dimnames")=List of 2
-  ..@ proj4string:Formal class 'CRS' [package "sp"] with 1 slot
-
- -
- -
-
-

Specify projection (CRS)

-
-
crs(occs) <- CRS("+proj=longlat +ellps=WGS84 +datum=WGS84")
-
- -

See http://spatialreference.org

- -
- -
-
-

Project to Mercator and plot

-
-
plot(gmap(occs, type = "satellite"))
-points(Mercator(occs), col = "red", pch = 20, cex = 2)
-
- -

plot of chunk unnamed-chunk-6

- -
- -
-
-

Alternatively, load shapefile

-
-
occs <- shapefile("occs.shp")
-plot(gmap(occs, type = "satellite"))
-points(Mercator(occs), col = "red", pch = 20, cex = 2)
-
- -

plot of chunk unnamed-chunk-8

- -
- -
-
-

Using ggmap

-
-
library(ggmap)
-map <- get_map(bbox(occs), maptype = "watercolor", source = "stamen")
-ggmap(map) +
-  geom_point(aes(x = coords.x1, y = coords.x2), data = as.data.frame(coordinates(occs)),
-             colour = "red", size = 4)
-
- -

plot of chunk unnamed-chunk-9

- -
- -
-
-

Raster data

-
- -
- -
-
-

Download elevation data

-
-
elevation <- getData("alt", country = "ESP")
-
- -
library(rasterVis)
-levelplot(elevation)
-
- -

plot of chunk unnamed-chunk-11

- -
- -
-
-

Dynamic interactive maps with leaflet

-
-
library(mapview)
-mapView(occs)
-
- -
- -
-
-

Remote sensing growing fast

-
-

e.g. RStoolbox

- -

- -
- -
-
-

Doing GIS in R: main advantages

-
-
    -
  • Fully-reproducible scripts

  • -
  • Harness all R stats power

    - -
      -
    • Data wrangling
    • -
    • Modelling
    • -
    • Dataviz
    • -
  • -
  • Easy!

  • -
- -
- -
-
-

Calling GIS from R

-
- - -

Includes calling R from ArcGIS too

- -
- -
-
-

To read more

- - -
- - -
-
- - - - - - - - - - diff --git a/GISwithR.md b/GISwithR.md deleted file mode 100644 index 0e6f5eb..0000000 --- a/GISwithR.md +++ /dev/null @@ -1,257 +0,0 @@ -GIS with R: slides for the unconverted -======================================================== -author: Francisco Rodriguez-Sanchez -date: @frod_san -2015-11-14 - - -R: not only for stats -===================== - -![](images/R.jpg) - - -R can make beautiful maps -========================= -type: section - - - -Made in R -========== - -![](images/bike_ggplot.png) - -http://spatial.ly/2012/02/great-maps-ggplot2/ - - -Made in R -========= - -![](images/facebook_map.png) - -http://paulbutler.org/archives/visualizing-facebook-friends/ - - -Made in R -========= - -![](images/airMadrid_stamen.png) - -http://oscarperpinan.github.io/spacetime-vis/ - - -Made in R -========= - -![](images/cft.png) - -http://oscarperpinan.github.io/spacetime-vis/ - - -Made in R -========= - -![](images/vLine.svg) - -http://oscarperpinan.github.io/spacetime-vis/ - - -And it's very easy! -=================== -type: section - - -Map species occurrences in 2 lines of code -========================================== - - - - -```r -plot(gmap(occdata, type = "satellite")) -points(occdata, col = "red", pch=20, cex = 2) -``` - -![plot of chunk unnamed-chunk-2](GISwithR-figure/unnamed-chunk-2-1.png) - - - -Let's go step by step -===================== -type: section - - -A dataframe of species occurrences -================================== - - -| |species | lon| lat| -|:--|:---------------------|------:|------:| -|1 |Solanum acaule Bitter | -66.10| -21.90| -|2 |Solanum acaule Bitter | -71.00| -13.50| -|52 |Solanum acaule Bitter | -66.43| -24.22| -|53 |Solanum acaule Bitter | -72.07| -13.35| -|54 |Solanum acaule Bitter | -68.97| -15.23| -|55 |Solanum acaule Bitter | -64.95| -17.75| - - -Make it a spatial object -======================== - - -```r -coordinates(occs) <- c("lon", "lat") -str(occs, 2) -``` - -``` -Formal class 'SpatialPointsDataFrame' [package "sp"] with 5 slots - ..@ data :'data.frame': 49 obs. of 1 variable: - ..@ coords.nrs : int [1:2] 2 3 - ..@ coords : num [1:49, 1:2] -66.1 -71 -66.4 -72.1 -69 ... - .. ..- attr(*, "dimnames")=List of 2 - ..@ bbox : num [1:2, 1:2] -72.5 -24.2 -64.7 -12.5 - .. ..- attr(*, "dimnames")=List of 2 - ..@ proj4string:Formal class 'CRS' [package "sp"] with 1 slot -``` - - -Specify projection (CRS) -======================== - - -```r -crs(occs) <- CRS("+proj=longlat +ellps=WGS84 +datum=WGS84") -``` - -See http://spatialreference.org - - -Project to Mercator and plot -============================ - - -```r -plot(gmap(occs, type = "satellite")) -points(Mercator(occs), col = "red", pch = 20, cex = 2) -``` - -![plot of chunk unnamed-chunk-6](GISwithR-figure/unnamed-chunk-6-1.png) - - -Alternatively, load shapefile -============================= - - - - -```r -occs <- shapefile("occs.shp") -plot(gmap(occs, type = "satellite")) -points(Mercator(occs), col = "red", pch = 20, cex = 2) -``` - -![plot of chunk unnamed-chunk-8](GISwithR-figure/unnamed-chunk-8-1.png) - - -Using ggmap -=========== - - -```r -library(ggmap) -map <- get_map(bbox(occs), maptype = "watercolor", source = "stamen") -ggmap(map) + - geom_point(aes(x = coords.x1, y = coords.x2), data = as.data.frame(coordinates(occs)), - colour = "red", size = 4) -``` - -![plot of chunk unnamed-chunk-9](GISwithR-figure/unnamed-chunk-9-1.png) - - -Raster data -=========== -type: section - - -Download elevation data -========================== - - -```r -elevation <- getData("alt", country = "ESP") -``` - - -```r -library(rasterVis) -levelplot(elevation) -``` - -![plot of chunk unnamed-chunk-11](GISwithR-figure/unnamed-chunk-11-1.png) - - - -Dynamic interactive maps with leaflet -===================================== - - -```r -library(mapview) -mapView(occs) -``` - -![plot of chunk unnamed-chunk-12](GISwithR-figure/unnamed-chunk-12-1.png) - - - -Remote sensing growing fast -=========================== - -e.g. RStoolbox - -![](images/rstoolbox.png) - - -Doing GIS in R: main advantages -=============================== -incremental: true - -- Fully-reproducible scripts - -- **Harness all R stats power** - - - Data wrangling - - - Modelling - - - Dataviz - -- Easy! - - - - -Calling GIS from R -================== - -- Grass: [`spgrass6`](http://www.rdocumentation.org/packages/spgrass6) -- SAGA: [`RSAGA`](http://www.rdocumentation.org/packages/RSAGA) -- ArcGIS: https://github.com/R-ArcGIS -![](images/R_ArcGis.png) - -Includes calling R from ArcGIS too - - - - -To read more -============ - -http://pakillo.github.io/R-GIS-tutorial - - - - - diff --git a/images/CC-BY-NC-SA_logo.png b/images/CC-BY-NC-SA_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..4de22229f53b37c5444b71ff74705a4cc0030c79 GIT binary patch literal 1815 zcmV+y2k7{TP)KE}o~rsgJTVs@Oyy&f8yeoT+29&vp% zIZC4w4=bihL~oPp5Bg|fIY6P6AcdpLOjbM{V*)d|G-aPClzW<`we>Z6@=UF`&OOa> zAI2n=B;SL3ff0%X857t>l0Durjbsp9p(H!>(zJr3J5e%J#ENqjTVoPlMtW8H=O-&88x3|;P zt5+!)406Ra+R!JD#l0)hFr{-U$*^R|g{sMOG&Aqjq~f0k!&F^et=`wxMjIO&WGrYy zAI4y8p_dvO89Y!p8o_XA&`ZbyEZ0ab$ODm^o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