From 8808e31080dd8db50427b1a3fee36068059cac4c Mon Sep 17 00:00:00 2001 From: "lucas.longour_ird.fr" <lucas.longour@ird.fr> Date: Fri, 23 Sep 2022 15:16:25 +0700 Subject: [PATCH] update preface --- index.qmd | 16 +++++++++++++++- public/img/by-nc-sa.png | Bin 0 -> 1587 bytes public/index.html | 13 +++++++++++++ public/search.json | 7 +++++++ 4 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 public/img/by-nc-sa.png diff --git a/index.qmd b/index.qmd index a0c42fb..94fd305 100644 --- a/index.qmd +++ b/index.qmd @@ -1 +1,15 @@ -# Preface {.unnumbered} \ No newline at end of file +# Preface {.unnumbered} + +This manual is tended both for R users wishing to set up spatial data peocessing and for users wishing to use R to carry out the tasks that they usually carry out with GIS. The main steps in the processing of geographic information are covered. Emphasis is placed on the processing of vector data but a part is still dedicated to raster data. + +**How to use the manual**\ +The RStudio project containing all the data used in the manual is available [here](https://github.com/rCarto/geodata/archive/refs/heads/main.zip). Once the file is unzipped it is possible to test all the manipulations proposed in the RStudion project. + +**Context**\ +This manual has been designed from the courses "[Géomatique avec R](https://rcarto.github.io/geomatique_avec_r/)" and "[Cartographie avec R](https://rcarto.github.io/cartographie_avec_r/)" by Timothée Giraud and Hugues Pecout. It has been translated and its examples have been adapted to the geographical distribution of the audience. + +------------------------------------------------------------------------ + +{fig-align="left"} + +The online version of this document licensed under the [Creative Commons Attribution-NonCommercial-ShareAlike 4.0](http://creativecommons.org/licenses/by-nc-sa/4.0/). diff --git a/public/img/by-nc-sa.png b/public/img/by-nc-sa.png new file mode 100644 index 0000000000000000000000000000000000000000..867c1ac9e6e4e7f5efc3f4997d79db41eb2a30fa GIT binary patch literal 1587 zcmW;Ld0f(G9KdmwS&js4u9;z}X-j?0@TzP%@A60;9;Iazt2|a%n#w}ukZ|SEJW@Ow z5Z(uZ3Wy*gqQ>P3UaclsZdPkLw^_?v?rERb`}ci*&+GZ~c|Cck@IV-J7Zd`4z=DGU zBEcF9J}V;wFrz<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0?1h&Xc2y zMqRn$8uAR$iCPj@KN+&8yCNKo&R;T!DvJLDZjv>Bq;tc%ec3M{Mx9QVtev@CObm;V zWgow4FhjWf?MZXK>O1_>yPeMJWk{2*(HLX=*BZj38&!YFp8t9~o~iZKavY$svz|~{ zWE^6X$0^g&3UiyFll$F~6zG=nRZ}Rdlr_oNmo<^#_darmp=9O0+1aE3`Is{s_YPuk zcHH4-Uu5;olI@rG*Jb&}NbxQ#%En}W&8z5!DpZWK8)t5ldVyZ#dN`)<N`fJ=8Kx~Q zZTlA%KmRy6#Fo1A)FmM#<+fK!h1rsg)q$eaH^nc9aJ0pz$Rw3+3%fBNclR~U=-6Cl z1Izdm?aUj`x8p(QI7Y>&y{BO)AtDhqydfXbZ}Ao&4@Wx^vT&<2!y!!99RGtCMZZHB zj}o!P_whF+Gs#iJf`Ab5g^rp`{YcFY^+@}LCEY1u`d9c>_6yZEO4MgA__XsRN`}VV zXsxg`ZJJkGb3k|?C4wNj<M#57I8~Hf#~~tmJyze|b1Dz}#*LjhfxWq&jwj+Wud{Rg zH}`wD#);Rzj@xyGP=NWuFR^+DE5)X_tCLz!e7YWV0^_kaWNR_j(LY{*&0qGMcDXY% z|H?m&#qErJe!e6v@JVX__&w4M8O~kR$JFX4UT;mRXh<@z$7JQ50Vn07l_t9OvZL|& z&7`Kh$c^L|>b*%Ak3t2hJ9XVeX*lu9zZP5FQ$zb<7a`*E)&UJO{*aY2Zs;kkkQ6I@ z-aa^6m^AC-RGkckqnAC1!Nb2^KfR(|fnV8EeP?zl)z&0Tw(+J<-pDY0bM16|w`E|a RI~BZrNbs@n0FEDq@*k0gHhKU6 literal 0 HcmV?d00001 diff --git a/public/index.html b/public/index.html index 51d201c..d50c301 100644 --- a/public/index.html +++ b/public/index.html @@ -162,6 +162,19 @@ ul.task-list{list-style: none;} <section id="preface" class="level1 unnumbered"> <p><img src="img/geohealth_banner.jpeg" title="Mapping and spatial analyses in R for One Health studies" class="quarto-cover-image img-fluid"></p><h1 class="unnumbered">Preface</h1> +<p>This manual is tended both for R users wishing to set up spatial data peocessing and for users wishing to use R to carry out the tasks that they usually carry out with GIS. The main steps in the processing of geographic information are covered. Emphasis is placed on the processing of vector data but a part is still dedicated to raster data.</p> +<p><strong>How to use the manual</strong><br> +The RStudio project containing all the data used in the manual is available <a href="https://github.com/rCarto/geodata/archive/refs/heads/main.zip">here</a>. Once the file is unzipped it is possible to test all the manipulations proposed in the RStudion project.</p> +<p><strong>Context</strong><br> +This manual has been designed from the courses “<a href="https://rcarto.github.io/geomatique_avec_r/">Géomatique avec R</a>†and “<a href="https://rcarto.github.io/cartographie_avec_r/">Cartographie avec R</a>†by Timothée Giraud and Hugues Pecout. It has been translated and its examples have been adapted to the geographical distribution of the audience.</p> +<hr> +<div class="quarto-figure quarto-figure-left"> +<figure class="figure"> +<p><img src="img/by-nc-sa.png" class="img-fluid figure-img"></p> +<p></p><figcaption aria-hidden="true" class="figure-caption">Creative Commons License</figcaption><p></p> +</figure> +</div> +<p>The online version of this document licensed under the <a href="http://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0</a>.</p> </section> diff --git a/public/search.json b/public/search.json index 8888cec..e11483d 100644 --- a/public/search.json +++ b/public/search.json @@ -201,5 +201,12 @@ "title": "4 Work with Raster Data", "section": "4.6 Transformation and conversion", "text": "4.6 Transformation and conversion\n\n4.6.1 Rasterization\nConvert polygons to raster format.\n\nchamkarmon = subset(district, district$ADM2_PCODE ==\"KH1201\") \nraster_district <- rasterize(x = chamkarmon, y = elevation_clip_utm)\n\n\nplot(raster_district)\n\n\n\n\n\n\n\n\nConvert points to raster format\n\n#rasterization of the centroids of the municipalities\nraster_dist_centroid <- rasterize(x = centroids(district), \n y = elevation_clip_utm, fun=sum)\nplot(raster_dist_centroid, col = \"red\")\nplot(district, add =TRUE)\n\n\n\n\nConvert lines in raster format\n\n#rasterization of municipal boundaries\nraster_dist_line <- rasterize(x = as.lines(district), y = elevation_clip_utm, fun=sum)\n\n\nplot(raster_dist_line)\n\n\n\n\n\n\n4.6.2 Vectorisation\nTransform a raster to vector polygons.\n\npolygon_elevation <- as.polygons(elevation_clip_utm)\n\n\nplot(polygon_elevation, y = 1, border=\"white\")\n\n\n\n\nTransform a raster to vector points.\n\npoints_elevation <- as.points(elevation_clip_utm)\n\n\nplot(points_elevation, y = 1, cex = 0.3)\n\n\n\n\nTransform a raster into vector lines.\n\nlines_elevation <- as.lines(elevation_clip_utm)\n\n\nplot(lines_elevation)\n\n\n\n\n\n\n4.6.3 terra, raster, sf, stars…\nReference packages for manipulating spatial data all rely o their own object class. It is sometimes necessary to convert these objects from one class to another class to take advance of all the features offered by these different packages.\nConversion functions for raster data:\n\n\n\nFROM/TO\nraster\nterra\nstars\n\n\n\n\nraster\n\nrast()\nst_as_stars()\n\n\nterra\nraster()\n\nst_as_stars()\n\n\nstars\nraster()\nas(x, ‘Raster’) + rast()\n\n\n\n\nConversion functions for vector data:\n\n\n\nFROM/TO\nsf\nsp\nterra\n\n\n\n\nsf\n\nas(x, ‘Spatial’)\nvect()\n\n\nsp\nst_as_sf()\n\nvect()\n\n\nterra\nst_as_sf()\nas(x, ‘Spatial’)\n\n\n\n\n\n\n\n\nHijmans, Robert J. 2022. “Terra: Spatial Data Analysis.†https://CRAN.R-project.org/package=terra.\n\n\nLi, Xingong. 2009. “Map Algebra and Beyond : 1. Map Algebra for Scalar Fields.†https://slideplayer.com/slide/5822638/.\n\n\nMadelin, Malika. 2021. “Analyse d’images Raster (Et Télédétection).†https://mmadelin.github.io/sigr2021/SIGR2021_raster_MM.html.\n\n\nMennis, Jeremy. 2015. “Fundamentals of GIS : Raster Operations.†https://cupdf.com/document/gus-0262-fundamentals-of-gis-lecture-presentation-7-raster-operations-jeremy.html.\n\n\nNowosad, Jakub. 2021. “Image Processing and All Things Raster.†https://nowosad.github.io/SIGR2021/workshop2/workshop2.html.\n\n\nRacine, Etienne B. 2016. “The Visual Raster Cheat Sheet.†https://rpubs.com/etiennebr/visualraster." + }, + { + "objectID": "index.html", + "href": "index.html", + "title": "Mapping and spatial analyses in R for One Health studies", + "section": "", + "text": "This manual is tended both for R users wishing to set up spatial data peocessing and for users wishing to use R to carry out the tasks that they usually carry out with GIS. The main steps in the processing of geographic information are covered. Emphasis is placed on the processing of vector data but a part is still dedicated to raster data.\nHow to use the manual\nThe RStudio project containing all the data used in the manual is available here. Once the file is unzipped it is possible to test all the manipulations proposed in the RStudion project.\nContext\nThis manual has been designed from the courses “Géomatique avec R†and “Cartographie avec R†by Timothée Giraud and Hugues Pecout. It has been translated and its examples have been adapted to the geographical distribution of the audience.\n\n\n\n\nCreative Commons License\n\n\nThe online version of this document licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0." } ] \ No newline at end of file -- GitLab