diff --git a/.gitignore b/.gitignore index d44df33..1a6eb56 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ -.Rproj.user -.Rhistory -.RData -.Ruserdata +.Rproj.user +.Rhistory +.RData +.Ruserdata +curvas_nivel/ +*.pdf diff --git a/01_incidencia_delictiva_nac/inc_delic_anio_mex.pdf b/01_incidencia_delictiva_nac/inc_delic_anio_mex.pdf deleted file mode 100644 index 6faebf0..0000000 Binary files a/01_incidencia_delictiva_nac/inc_delic_anio_mex.pdf and /dev/null differ diff --git a/01_incidencia_delictiva_nac/practica_1.pdf b/01_incidencia_delictiva_nac/practica_1.pdf deleted file mode 100644 index ce82043..0000000 Binary files a/01_incidencia_delictiva_nac/practica_1.pdf and /dev/null differ diff --git a/02_otec/PracticaOTEC.pdf b/02_otec/PracticaOTEC.pdf deleted file mode 100644 index e6b54ff..0000000 Binary files a/02_otec/PracticaOTEC.pdf and /dev/null differ diff --git a/02_otec/curvas_nivel/curvas_nivel.dbf b/02_otec/curvas_nivel/curvas_nivel.dbf deleted file mode 100644 index d1e18d0..0000000 Binary files a/02_otec/curvas_nivel/curvas_nivel.dbf and /dev/null differ diff --git a/02_otec/curvas_nivel/curvas_nivel.prj b/02_otec/curvas_nivel/curvas_nivel.prj deleted file mode 100644 index f45cbad..0000000 --- a/02_otec/curvas_nivel/curvas_nivel.prj +++ /dev/null @@ -1 +0,0 @@ -GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]] \ No newline at end of file diff --git a/02_otec/curvas_nivel/curvas_nivel.shp b/02_otec/curvas_nivel/curvas_nivel.shp deleted file mode 100644 index 754eabf..0000000 Binary files a/02_otec/curvas_nivel/curvas_nivel.shp and /dev/null differ diff --git a/02_otec/curvas_nivel/curvas_nivel.shx b/02_otec/curvas_nivel/curvas_nivel.shx deleted file mode 100644 index 4a8ee88..0000000 Binary files a/02_otec/curvas_nivel/curvas_nivel.shx and /dev/null differ diff --git a/02_otec/zonas_potenciales.pdf b/02_otec/zonas_potenciales.pdf deleted file mode 100644 index 8093bd3..0000000 Binary files a/02_otec/zonas_potenciales.pdf and /dev/null differ diff --git a/03_heatmaps/heatmaps_san_diego.pdf b/03_heatmaps/heatmaps_san_diego.pdf deleted file mode 100644 index 81ed042..0000000 Binary files a/03_heatmaps/heatmaps_san_diego.pdf and /dev/null differ diff --git a/03_heatmaps/practicaHeatMaps.pdf b/03_heatmaps/practicaHeatMaps.pdf deleted file mode 100644 index c47639c..0000000 Binary files a/03_heatmaps/practicaHeatMaps.pdf and /dev/null differ diff --git a/04_buffer/buffer_practica.pdf b/04_buffer/buffer_practica.pdf deleted file mode 100644 index fd3560e..0000000 Binary files a/04_buffer/buffer_practica.pdf and /dev/null differ diff --git a/04_buffer/zona_riesgo_cidh.pdf b/04_buffer/zona_riesgo_cidh.pdf deleted file mode 100644 index 0c2d856..0000000 Binary files a/04_buffer/zona_riesgo_cidh.pdf and /dev/null differ diff --git a/README.md b/README.md index d354bf0..73ccc0a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ # Proyectos: Sistemas de Información Geográfica +## Universidad del Caribe (Primavera 2020) + Este repositorio contiene el código para cada uno de los poryectos desarrollados en la materia de Sistemas de Información Geográfica de la Universidad del Caribe en Cancún, Q. Roo, México. \ No newline at end of file diff --git a/renv.lock b/renv.lock index 8810042..56019a2 100644 --- a/renv.lock +++ b/renv.lock @@ -1,6 +1,6 @@ { "R": { - "Version": "3.6.2", + "Version": "4.0.2", "Repositories": [ { "Name": "CRAN", @@ -9,13 +9,6 @@ ] }, "Packages": { - "BH": { - "Package": "BH", - "Version": "1.72.0-3", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "8f9ce74c6417d61f0782cbae5fd2b7b0" - }, "DBI": { "Package": "DBI", "Version": "1.1.0", @@ -23,33 +16,12 @@ "Repository": "CRAN", "Hash": "4744be45519d675af66c28478720fce5" }, - "EnvStats": { - "Package": "EnvStats", - "Version": "2.3.1", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "e34ac5fc347e5b75672f6f99320005bb" - }, - "Formula": { - "Package": "Formula", - "Version": "1.2-3", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "0537b6f1f38ea1fd514089192724bb6e" - }, - "Hmisc": { - "Package": "Hmisc", - "Version": "4.3-1", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "b354bb2e63e1d6947eb05fa3bc355b2f" - }, "KernSmooth": { "Package": "KernSmooth", - "Version": "2.23-16", + "Version": "2.23-17", "Source": "Repository", "Repository": "CRAN", - "Hash": "997471f25a7ed6c782f0090ce52cc63a" + "Hash": "bbff70c8c0357b5b88238c83f680fcd3" }, "LearnBayes": { "Package": "LearnBayes", @@ -60,10 +32,10 @@ }, "MASS": { "Package": "MASS", - "Version": "7.3-51.5", + "Version": "7.3-51.6", "Source": "Repository", "Repository": "CRAN", - "Hash": "9efe80472b21189ebab1b74169808c26" + "Hash": "1dad32ac9dbd8057167b2979fb932ff7" }, "Matrix": { "Package": "Matrix", @@ -72,19 +44,12 @@ "Repository": "CRAN", "Hash": "08588806cba69f04797dab50627428ed" }, - "MatrixModels": { - "Package": "MatrixModels", - "Version": "0.4-1", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "d57ac35220b39c591388ab3a080f9cbe" - }, "R.methodsS3": { "Package": "R.methodsS3", - "Version": "1.7.1", + "Version": "1.8.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "525c2e4d8915038c0ca7f9c1eedbd47a" + "Hash": "23822a838096ceb132e5041c9a68c3ef" }, "R.oo": { "Package": "R.oo", @@ -107,13 +72,6 @@ "Repository": "CRAN", "Hash": "292b54f8f4b94669b08f94e5acce6be2" }, - "RANN": { - "Package": "RANN", - "Version": "2.6.1", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "d128ea05a972d3e67c6f39de52c72bd7" - }, "RColorBrewer": { "Package": "RColorBrewer", "Version": "1.1-2", @@ -121,61 +79,26 @@ "Repository": "CRAN", "Hash": "e031418365a7f7a766181ab5a41a5716" }, - "RCurl": { - "Package": "RCurl", - "Version": "1.98-1.1", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "26b1263f36bd66a9e8b5c80753ebedea" - }, "RODBC": { "Package": "RODBC", - "Version": "1.3-16", + "Version": "1.3-17", "Source": "Repository", "Repository": "CRAN", - "Hash": "feba5e7191ee444ef2cd6c530a2b3d3e" + "Hash": "8e6bcf765e7713e60d0b859d50724355" }, "Rcpp": { "Package": "Rcpp", - "Version": "1.0.3", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "f3ca785924863b0e4c8cb23b6a5c75a1" - }, - "RcppArmadillo": { - "Package": "RcppArmadillo", - "Version": "0.9.850.1.0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "880ddd23eb847541ba62c9a6ca780f86" - }, - "SparseM": { - "Package": "SparseM", - "Version": "1.78", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "fbe4ac267bf42a91e495cc68ad3f8b63" - }, - "SpatialPack": { - "Package": "SpatialPack", - "Version": "0.3-8", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "11d7f492c29cf9908c4d183a4166fc74" - }, - "TH.data": { - "Package": "TH.data", - "Version": "1.0-10", + "Version": "1.0.5", "Source": "Repository", "Repository": "CRAN", - "Hash": "84dffc44f23c419537c1c79cc46347a5" + "Hash": "125dc7a0ed375eb68c0ce533b48d291f" }, "XML": { "Package": "XML", - "Version": "3.98-1.20", + "Version": "3.99-0.5", "Source": "Repository", "Repository": "CRAN", - "Hash": "0ec6acb7f3e2f376ca6b9541b9709107" + "Hash": "408d42d1359f2a84d377c1f7f0568624" }, "abind": { "Package": "abind", @@ -184,13 +107,6 @@ "Repository": "CRAN", "Hash": "4f57884290cc75ab22f4af9e9d4ca862" }, - "acepack": { - "Package": "acepack", - "Version": "1.4.1", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "9d5038b94a50c7bf26940e2ef7f340c8" - }, "assertthat": { "Package": "assertthat", "Version": "0.2.1", @@ -200,10 +116,10 @@ }, "backports": { "Package": "backports", - "Version": "1.1.5", + "Version": "1.1.8", "Source": "Repository", "Repository": "CRAN", - "Hash": "e9f705633dc932bfd5b02b17a5053a06" + "Hash": "3ef0eac19317fd03c0c854aed581d473" }, "base64enc": { "Package": "base64enc", @@ -212,26 +128,26 @@ "Repository": "CRAN", "Hash": "543776ae6848fde2f48ff3816d0628bc" }, - "bitops": { - "Package": "bitops", - "Version": "1.0-6", + "boot": { + "Package": "boot", + "Version": "1.3-25", "Source": "Repository", "Repository": "CRAN", - "Hash": "0b118d5900596bae6c4d4865374536a6" + "Hash": "bd51734a754b6c2baf28b2d1ebc11e91" }, - "boot": { - "Package": "boot", - "Version": "1.3-24", + "callr": { + "Package": "callr", + "Version": "3.4.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "72557d88b5f42f01221dfa436de99301" + "Hash": "643163a00cb536454c624883a10ae0bc" }, "cartography": { "Package": "cartography", - "Version": "2.3.0", + "Version": "2.4.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "d90142b3bd42bf4856617dea5ee27ed7" + "Hash": "3018b4ccfecd256dab2a21e02817e689" }, "cellranger": { "Package": "cellranger", @@ -240,47 +156,26 @@ "Repository": "CRAN", "Hash": "f61dbaec772ccd2e17705c1e872e9e7c" }, - "checkmate": { - "Package": "checkmate", - "Version": "2.0.0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "a667800d5f0350371bedeb8b8b950289" - }, "class": { "Package": "class", - "Version": "7.3-15", + "Version": "7.3-17", "Source": "Repository", "Repository": "CRAN", - "Hash": "4fba6a022803b6c3f30fd023be3fa818" + "Hash": "9267f5dab59a4ef44229858a142bded1" }, "classInt": { "Package": "classInt", - "Version": "0.4-2", + "Version": "0.4-3", "Source": "Repository", "Repository": "CRAN", - "Hash": "ce0ff2c9be2ec4d8b7b09f467a330e63" + "Hash": "17bdfa3c51df4a6c82484d13b11fb380" }, "cli": { "Package": "cli", - "Version": "2.0.1", + "Version": "2.0.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "5173d8ab28680cf263636b110f4f3220" - }, - "clipr": { - "Package": "clipr", - "Version": "0.7.0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "08cf4045c149a0f0eaf405324c7495bd" - }, - "cluster": { - "Package": "cluster", - "Version": "2.1.0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "db63a44aab5aadcb6bf2f129751d129a" + "Hash": "ff0becff7bfdfe3f75d29aff8f3172dd" }, "coda": { "Package": "coda", @@ -303,6 +198,13 @@ "Repository": "CRAN", "Hash": "6b436e95723d1f0e861224dd9b094dfb" }, + "cpp11": { + "Package": "cpp11", + "Version": "0.2.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "c4c83167f43ca762a9fa998d4fead3ae" + }, "crayon": { "Package": "crayon", "Version": "1.3.4", @@ -312,10 +214,10 @@ }, "crosstalk": { "Package": "crosstalk", - "Version": "1.0.0", + "Version": "1.1.0.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "4ac529753d1e529966ef675d7f0c762b" + "Hash": "ae55f5d7c02f0ab43c58dd050694f2b4" }, "curl": { "Package": "curl", @@ -324,19 +226,19 @@ "Repository": "CRAN", "Hash": "2b7d10581cc730804e9ed178c8374bd6" }, - "data.table": { - "Package": "data.table", - "Version": "1.12.8", + "deldir": { + "Package": "deldir", + "Version": "0.1-28", "Source": "Repository", "Repository": "CRAN", - "Hash": "cd711af60c47207a776213a368626369" + "Hash": "0edc0c2f566b3aa0271f37314e2afe0f" }, - "deldir": { - "Package": "deldir", - "Version": "0.1-25", + "desc": { + "Package": "desc", + "Version": "1.2.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "f9c25b772f8477d41b583b3d29a33aec" + "Hash": "6c8fe8fa26a23b79949375d372c7b395" }, "dichromat": { "Package": "dichromat", @@ -347,17 +249,17 @@ }, "digest": { "Package": "digest", - "Version": "0.6.23", + "Version": "0.6.25", "Source": "Repository", "Repository": "CRAN", - "Hash": "931fd68809dab4609b4d4b5702206066" + "Hash": "f697db7d92b7028c4b3436e9603fb636" }, "dplyr": { "Package": "dplyr", - "Version": "0.8.3", + "Version": "1.0.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "c426258a806b7e69613432b197b9954d" + "Hash": "018b2fc43cb25d9f07241986c53fbf8e" }, "e1071": { "Package": "e1071", @@ -368,10 +270,10 @@ }, "ellipsis": { "Package": "ellipsis", - "Version": "0.3.0", + "Version": "0.3.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "7067d90c1c780bfe80c0d497e3d7b49d" + "Hash": "fd2844b3a43ae2d27e70ece2df1b4e2a" }, "evaluate": { "Package": "evaluate", @@ -382,10 +284,10 @@ }, "expm": { "Package": "expm", - "Version": "0.999-4", + "Version": "0.999-5", "Source": "Repository", "Repository": "CRAN", - "Hash": "d4e0e839218ca1fa869f807b8668576e" + "Hash": "6da939036c445e851f7ef690e349cc2c" }, "fansi": { "Package": "fansi", @@ -396,45 +298,24 @@ }, "farver": { "Package": "farver", - "Version": "2.0.1", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "e1e33215c942e78d2128221079b5dc35" - }, - "fasterize": { - "Package": "fasterize", - "Version": "1.0.0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "3f3fd15233fad8099557527d89a6d624" - }, - "fastmap": { - "Package": "fastmap", - "Version": "1.0.1", + "Version": "2.0.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "83ab58a0518afe3d17e41da01af13b60" + "Hash": "dad6793a5a1f73c8e91f1a1e3e834b05" }, "foreach": { "Package": "foreach", - "Version": "1.4.8", + "Version": "1.5.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "fbca7161e09d205648cd784611633ea8" - }, - "foreign": { - "Package": "foreign", - "Version": "0.8-75", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "9a7efaa7320b9f327a904d1e615b0b46" + "Hash": "8fb3ff01ee7d85893f56df8d77213381" }, "gdalUtils": { "Package": "gdalUtils", - "Version": "2.0.3", + "Version": "2.0.3.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "a48a701bc4cac8e64d98abffa4e83497" + "Hash": "05ee75453c7c7cf6741a050af30927ba" }, "gdata": { "Package": "gdata", @@ -443,19 +324,26 @@ "Repository": "CRAN", "Hash": "465ccb84427f5fe2c54f8620666db131" }, + "generics": { + "Package": "generics", + "Version": "0.0.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "b8cff1d1391fd1ad8b65877f4c7f2e53" + }, "ggplot2": { "Package": "ggplot2", - "Version": "3.2.1", + "Version": "3.3.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "9ac60f09a2f437af8df8638ef3da0288" + "Hash": "4ded8b439797f7b1693bd3d238d0106b" }, "glue": { "Package": "glue", - "Version": "1.3.1", + "Version": "1.4.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "d4e25697c450c01b202c79ef35694a83" + "Hash": "f43e0d5e85ccb0a4045670c0607ee504" }, "gmodels": { "Package": "gmodels", @@ -487,17 +375,10 @@ }, "gtools": { "Package": "gtools", - "Version": "3.8.1", + "Version": "3.8.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "b7f3a3bee8ec0858e8cbc09cfdc35ced" - }, - "highr": { - "Package": "highr", - "Version": "0.8", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "4dc5bb88961e347a0f4d8aad597cbfac" + "Hash": "0a749b4458d19a54acae93c64e3e7c85" }, "hms": { "Package": "hms", @@ -506,19 +387,12 @@ "Repository": "CRAN", "Hash": "726671f634529d470545f9fd1a9d1869" }, - "htmlTable": { - "Package": "htmlTable", - "Version": "1.13.3", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "90d75b22931af95e2dbb17188e1dfa0c" - }, "htmltools": { "Package": "htmltools", - "Version": "0.4.0", + "Version": "0.5.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "2d7691222f82f41e93f6d30f169bd5e1" + "Hash": "7d651b7131794fe007b1ad6f21aaa401" }, "htmlwidgets": { "Package": "htmlwidgets", @@ -527,12 +401,12 @@ "Repository": "CRAN", "Hash": "41bace23583fbc25089edae324de2dc3" }, - "httpuv": { - "Package": "httpuv", - "Version": "1.5.2", + "isoband": { + "Package": "isoband", + "Version": "0.2.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "f793dad2c9ae14fbb1d22f16f23f8326" + "Hash": "6e58bd3d6b3dd82a944cd6f05ade228f" }, "iterators": { "Package": "iterators", @@ -541,26 +415,12 @@ "Repository": "CRAN", "Hash": "117128f48662573ff4c4e72608b9e202" }, - "jpeg": { - "Package": "jpeg", - "Version": "0.1-8.1", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "bc316c003aba520fc73d70ad53b5fc36" - }, "jsonlite": { "Package": "jsonlite", - "Version": "1.6", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "bc5739654d032acf531356e32e0d0f54" - }, - "knitr": { - "Package": "knitr", - "Version": "1.28", + "Version": "1.7.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "915a6f0134cdbdf016d7778bc80b2eda" + "Hash": "2657f20b9a74c996c602e74ebe540b06" }, "labeling": { "Package": "labeling", @@ -569,26 +429,12 @@ "Repository": "CRAN", "Hash": "73832978c1de350df58108c745ed0e3e" }, - "later": { - "Package": "later", - "Version": "1.0.0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "6d927978fc658d24175ce37db635f9e5" - }, "lattice": { "Package": "lattice", - "Version": "0.20-38", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "848f8c593fd1050371042d18d152e3d7" - }, - "latticeExtra": { - "Package": "latticeExtra", - "Version": "0.6-29", + "Version": "0.20-41", "Source": "Repository", "Repository": "CRAN", - "Hash": "590829599d6182cf7461787af34666ee" + "Hash": "fbd9285028b0263d76d18c95ae51a53d" }, "lazyeval": { "Package": "lazyeval", @@ -597,6 +443,13 @@ "Repository": "CRAN", "Hash": "d908914ae53b04d4c0c0fd72ecc35370" }, + "leafem": { + "Package": "leafem", + "Version": "0.1.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "18b3d2513d60498a319425d07a7e7afa" + }, "leaflet": { "Package": "leaflet", "Version": "2.0.3", @@ -620,17 +473,17 @@ }, "lifecycle": { "Package": "lifecycle", - "Version": "0.1.0", + "Version": "0.2.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "dc0e9c03b3635ff433b045ce6bf0612d" + "Hash": "361811f31f71f8a617a9a68bf63f1f42" }, "lwgeom": { "Package": "lwgeom", - "Version": "0.1-7", + "Version": "0.2-5", "Source": "Repository", "Repository": "CRAN", - "Hash": "93537aa398a2fc701bae9b055232a6b5" + "Hash": "cf96b08482dfbed1b7ab7d0ba4395077" }, "magrittr": { "Package": "magrittr", @@ -639,13 +492,6 @@ "Repository": "CRAN", "Hash": "1bb58822a20301cee84a41678e25d9b7" }, - "maptools": { - "Package": "maptools", - "Version": "0.9-9", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "11f9769cebea9435c02e0b83fc65dd76" - }, "markdown": { "Package": "markdown", "Version": "1.1", @@ -662,17 +508,10 @@ }, "mime": { "Package": "mime", - "Version": "0.8", + "Version": "0.9", "Source": "Repository", "Repository": "CRAN", - "Hash": "3d8abfab430c94a15e20eb91f052293f" - }, - "multcomp": { - "Package": "multcomp", - "Version": "1.4-12", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "0e521fe0d3dac4a951dc927595bf29f6" + "Hash": "e87a35ec73b157552814869f45a63aa3" }, "munsell": { "Package": "munsell", @@ -681,40 +520,26 @@ "Repository": "CRAN", "Hash": "6dfe8bf774944bd5595785e3229d8771" }, - "mvtnorm": { - "Package": "mvtnorm", - "Version": "1.0-12", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "e5cf1b1d61a72646afbab28a20e9bd54" - }, "nlme": { "Package": "nlme", - "Version": "3.1-143", + "Version": "3.1-148", "Source": "Repository", "Repository": "CRAN", - "Hash": "7518d3b54a24f9291735a25467997858" + "Hash": "662f52871983ff3e3ef042c62de126df" }, - "nnet": { - "Package": "nnet", - "Version": "7.3-12", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "68287aec1f476c41d16ce1ace445800c" - }, - "nortest": { - "Package": "nortest", - "Version": "1.0-4", + "pillar": { + "Package": "pillar", + "Version": "1.4.6", "Source": "Repository", "Repository": "CRAN", - "Hash": "e587e7a30c737ad415590976481332e4" + "Hash": "bdf26e55ccb7df3e49a490150277f002" }, - "pillar": { - "Package": "pillar", - "Version": "1.4.3", + "pkgbuild": { + "Package": "pkgbuild", + "Version": "1.1.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "fa3ed60396b6998d0427c57dab90fba4" + "Hash": "404684bc4e3685007f9720adf13b06c1" }, "pkgconfig": { "Package": "pkgconfig", @@ -723,19 +548,12 @@ "Repository": "CRAN", "Hash": "01f28d4278f15c76cddbea05899c5d6f" }, - "plogr": { - "Package": "plogr", - "Version": "0.2.0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "09eb987710984fc2905c7129c7d85e65" - }, - "plyr": { - "Package": "plyr", - "Version": "1.8.5", + "pkgload": { + "Package": "pkgload", + "Version": "1.1.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "3f1b0dbcc503320e6e7aae6c3ff87eaa" + "Hash": "b6b150cd4709e0c0c9b5d51ac4376282" }, "png": { "Package": "png", @@ -744,13 +562,6 @@ "Repository": "CRAN", "Hash": "03b7076c234cb3331288919983326c55" }, - "polspline": { - "Package": "polspline", - "Version": "1.1.17", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "a5923f126ba9de76ba2cb5360f86d376" - }, "polyclip": { "Package": "polyclip", "Version": "1.10-0", @@ -758,12 +569,26 @@ "Repository": "CRAN", "Hash": "cb167f328b3ada4ec5cf67a7df4c900a" }, + "praise": { + "Package": "praise", + "Version": "1.0.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "a555924add98c99d2f411e37e7d25e9f" + }, "prettyunits": { "Package": "prettyunits", - "Version": "1.1.0", + "Version": "1.1.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "95ef9167b75dde9d2ccc3c7528393e7e" + }, + "processx": { + "Package": "processx", + "Version": "3.4.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "51bcc03e24fa50b5da40f285a916a1d6" + "Hash": "f4f13345fcb00c51ace12f65dd18749f" }, "progress": { "Package": "progress", @@ -772,40 +597,26 @@ "Repository": "CRAN", "Hash": "14dc9f7a3c91ebb14ec5bb9208a07061" }, - "promises": { - "Package": "promises", - "Version": "1.1.0", + "ps": { + "Package": "ps", + "Version": "1.3.4", "Source": "Repository", "Repository": "CRAN", - "Hash": "efbbe62da4709f7040a380c702bc7103" + "Hash": "a54a7dfd68124abb2225dbfa9a85c457" }, "purrr": { "Package": "purrr", - "Version": "0.3.3", + "Version": "0.3.4", "Source": "Repository", "Repository": "CRAN", - "Hash": "22aca7d1181718e927d403a8c2d69d62" - }, - "quantreg": { - "Package": "quantreg", - "Version": "5.54", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "12895b7bc4cd4f5209aa8ff52f6cf6b3" + "Hash": "97def703420c8ab10d8f0e6c72101e02" }, "raster": { "Package": "raster", - "Version": "3.0-7", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "7b4357239630e4e653dabade791bc889" - }, - "readr": { - "Package": "readr", - "Version": "1.3.1", + "Version": "3.3-13", "Source": "Repository", "Repository": "CRAN", - "Hash": "af8ab99cd936773a148963905736907b" + "Hash": "51cfecf7b9518d46b119f92d581616b6" }, "readxl": { "Package": "readxl", @@ -823,45 +634,31 @@ }, "renv": { "Package": "renv", - "Version": "0.9.3", + "Version": "0.11.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "c1a367437d8a8a44bec4b9d4974cb20c" - }, - "reshape2": { - "Package": "reshape2", - "Version": "1.4.3", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "15a23ad30f51789188e439599559815c" + "Hash": "1c3ef87cbb81c23ac96797781ec7aecc" }, "rgdal": { "Package": "rgdal", - "Version": "1.4-8", + "Version": "1.5-16", "Source": "Repository", "Repository": "CRAN", - "Hash": "a60887cdff80ba8a4b34a624b281b448" + "Hash": "3f840ce3afbcb78ad2a728558dba2078" }, "rgeos": { "Package": "rgeos", - "Version": "0.5-2", + "Version": "0.5-3", "Source": "Repository", "Repository": "CRAN", - "Hash": "dc2f6aa3dcc81a47fee312acd9afa2b0" + "Hash": "4b63e0cfe930613d0b28bb0761e84aad" }, "rlang": { "Package": "rlang", - "Version": "0.4.2", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "ff31d958a041593f58ba04fc637d90dd" - }, - "rms": { - "Package": "rms", - "Version": "5.1-4", + "Version": "0.4.7", "Source": "Repository", "Repository": "CRAN", - "Hash": "c79e200c3ae8306b7bc110c1cb79a840" + "Hash": "c06d2a6887f4b414f8e927afd9ee976a" }, "rpart": { "Package": "rpart", @@ -870,6 +667,13 @@ "Repository": "CRAN", "Hash": "9787c1fcb680e655d062e7611cadf78e" }, + "rprojroot": { + "Package": "rprojroot", + "Version": "1.3-2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "f6a407ae5dd21f6f80a6708bbb6eb3ae" + }, "rstudioapi": { "Package": "rstudioapi", "Version": "0.11", @@ -877,33 +681,19 @@ "Repository": "CRAN", "Hash": "33a5b27a03da82ac4b1d43268f80088a" }, - "sandwich": { - "Package": "sandwich", - "Version": "2.5-1", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "510d1f864cd565d8119801a49db4fd85" - }, "scales": { "Package": "scales", - "Version": "1.1.0", + "Version": "1.1.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "a1c68369c629ea3188d0676e37069c65" + "Hash": "6f76f71042411426ec8df6c54f34e6dd" }, "sf": { "Package": "sf", - "Version": "0.8-0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "6dca4669c2e0e4ac6704b54073bfc3b2" - }, - "shiny": { - "Package": "shiny", - "Version": "1.4.0", + "Version": "0.9-5", "Source": "Repository", "Repository": "CRAN", - "Hash": "6ca23724bb2c804c1d0b3db4862a39c7" + "Hash": "5b23b3b72c0d9962a59c57b110076f9a" }, "slippymath": { "Package": "slippymath", @@ -912,40 +702,33 @@ "Repository": "CRAN", "Hash": "abdaf883004a4791545655d79ca3aae0" }, - "sourcetools": { - "Package": "sourcetools", - "Version": "0.1.7", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "947e4e02a79effa5d512473e10f41797" - }, "sp": { "Package": "sp", - "Version": "1.3-2", + "Version": "1.4-2", "Source": "Repository", "Repository": "CRAN", - "Hash": "803f04b858b8520ac243d38e09741de6" + "Hash": "3290eebc34ba4df5e213878d54c1e623" }, "spData": { "Package": "spData", - "Version": "0.3.3", + "Version": "0.3.8", "Source": "Repository", "Repository": "CRAN", - "Hash": "150e95c424acf8aa17dc0c3dc852293f" + "Hash": "be5fc9cc13487505381071422d8346e2" }, "spatialEco": { "Package": "spatialEco", - "Version": "1.3-0", + "Version": "1.3-2", "Source": "Repository", "Repository": "CRAN", - "Hash": "929b08f35b984490a6830d221e094726" + "Hash": "fd263aedf70a3ad202b4b52eb8fa1e46" }, "spatstat": { "Package": "spatstat", - "Version": "1.63-0", + "Version": "1.64-1", "Source": "Repository", "Repository": "CRAN", - "Hash": "fa431855c96901c78c421b9f252a88da" + "Hash": "bf01485c922fd3bb6af165b9304539dd" }, "spatstat.data": { "Package": "spatstat.data", @@ -963,17 +746,24 @@ }, "spdep": { "Package": "spdep", - "Version": "1.1-3", + "Version": "1.1-5", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "e220c93e8a62be165fb5b56983ca2339" + }, + "stars": { + "Package": "stars", + "Version": "0.4-3", "Source": "Repository", "Repository": "CRAN", - "Hash": "4b550ca01798c27b717b7e3cd4d0f4b9" + "Hash": "f95567051881abcceb27cf8aec08200c" }, "stringi": { "Package": "stringi", - "Version": "1.4.5", + "Version": "1.4.6", "Source": "Repository", "Repository": "CRAN", - "Hash": "ced3b63472796155f74abc4eb5266c78" + "Hash": "e99d8d656980d2dd416a962ae55aec90" }, "stringr": { "Package": "stringr", @@ -982,13 +772,6 @@ "Repository": "CRAN", "Hash": "0759e6b6c0957edb1311028a49a35e76" }, - "survival": { - "Package": "survival", - "Version": "3.1-8", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "ad25122f95d04988f6f79d69aaadd53d" - }, "tensor": { "Package": "tensor", "Version": "1.5", @@ -996,47 +779,54 @@ "Repository": "CRAN", "Hash": "25cfab6cf405c15bccf7e69ec39df090" }, + "testthat": { + "Package": "testthat", + "Version": "2.3.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "0829b987b8961fb07f3b1b64a2fbc495" + }, "tibble": { "Package": "tibble", - "Version": "2.1.3", + "Version": "3.0.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "8248ee35d1e15d1e506f05f5a5d46a75" + "Hash": "08bd36bd34b20d4f7971d49e81deaab0" }, "tidyr": { "Package": "tidyr", - "Version": "1.0.0", + "Version": "1.1.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "8187ca2c27e80978f5b143bec554a437" + "Hash": "a0d8d887f9887f668e3d54d1b820c2a2" }, "tidyselect": { "Package": "tidyselect", - "Version": "0.2.5", + "Version": "1.1.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "971842fead8ee9e150495a0ede343a98" + "Hash": "6ea435c354e8448819627cf686f66e0a" }, "tmap": { "Package": "tmap", - "Version": "2.3-1", + "Version": "3.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "13890760adc2065b53882bb0aad45cc8" + "Hash": "0c9177bb053e8422fe8e1e628e335889" }, "tmaptools": { "Package": "tmaptools", - "Version": "2.0-2", + "Version": "3.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "7a7e75d528e40bd41327f536968b64da" + "Hash": "eae1a3c86cedd81d297a41041aa23e8f" }, "units": { "Package": "units", - "Version": "0.6-5", + "Version": "0.6-7", "Source": "Repository", "Repository": "CRAN", - "Hash": "35c5245622df501b51263b565d18c053" + "Hash": "4a3df844d6d35ca2ba2b7ba95446b955" }, "utf8": { "Package": "utf8", @@ -1047,17 +837,10 @@ }, "vctrs": { "Package": "vctrs", - "Version": "0.2.1", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "5c2d0fe441406cba811b46708ea28e41" - }, - "velox": { - "Package": "velox", - "Version": "0.2.0", + "Version": "0.3.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "e5fe7b3a61bf28552edb278a9eab3a80" + "Hash": "5ba3006888ac62fd5e97b208d00d3317" }, "viridis": { "Package": "viridis", @@ -1073,54 +856,33 @@ "Repository": "CRAN", "Hash": "ce4f6271baa94776db692f1cb2055bee" }, + "widgetframe": { + "Package": "widgetframe", + "Version": "0.3.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "0ee89e6cb58182d39b30a5b506e04808" + }, "withr": { "Package": "withr", - "Version": "2.1.2", + "Version": "2.2.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "aa57ed55ff2df4bea697a07df528993d" + "Hash": "ecd17882a0b4419545691e095b74ee89" }, "xfun": { "Package": "xfun", - "Version": "0.12", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "ccd8453a7b9e380628f6cd2862e46cad" - }, - "xtable": { - "Package": "xtable", - "Version": "1.8-4", + "Version": "0.16", "Source": "Repository", "Repository": "CRAN", - "Hash": "b8acdf8af494d9ec19ccb2481a9b11c2" - }, - "yaImpute": { - "Package": "yaImpute", - "Version": "1.0-32", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "d2e4d327457708d90e2d5b88807e5219" + "Hash": "b4106139b90981a8bfea9c10bab0baf1" }, "yaml": { "Package": "yaml", - "Version": "2.2.0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "c78bdf1d16bd4ec7ecc86c6986d53309" - }, - "zeallot": { - "Package": "zeallot", - "Version": "0.1.0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "ee9b643aa8331c45d8d82eb3a137c9bc" - }, - "zoo": { - "Package": "zoo", - "Version": "1.8-7", + "Version": "2.2.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "157e0e442de69a5b00ee5c7066d6184d" + "Hash": "2826c5d9efb0a88f657c7a679c7106db" } } } diff --git a/renv/activate.R b/renv/activate.R index 4baa934..56f9c74 100644 --- a/renv/activate.R +++ b/renv/activate.R @@ -2,7 +2,10 @@ local({ # the requested version of renv - version <- "0.9.3" + version <- "0.11.0" + + # the project directory + project <- getwd() # avoid recursion if (!is.na(Sys.getenv("RENV_R_INITIALIZING", unset = NA))) @@ -33,73 +36,132 @@ local({ } - # construct path to renv in library - libpath <- local({ - - root <- Sys.getenv("RENV_PATHS_LIBRARY", unset = "renv/library") - prefix <- paste("R", getRversion()[1, 1:2], sep = "-") - - # include SVN revision for development versions of R - # (to avoid sharing platform-specific artefacts with released versions of R) - devel <- - identical(R.version[["status"]], "Under development (unstable)") || - identical(R.version[["nickname"]], "Unsuffered Consequences") - - if (devel) - prefix <- paste(prefix, R.version[["svn rev"]], sep = "-r") - - file.path(root, prefix, R.version$platform) - - }) - - # try to load renv from the project library - if (requireNamespace("renv", lib.loc = libpath, quietly = TRUE)) { - - # warn if the version of renv loaded does not match - loadedversion <- utils::packageDescription("renv", fields = "Version") - if (version != loadedversion) { - - # assume four-component versions are from GitHub; three-component - # versions are from CRAN - components <- strsplit(loadedversion, "[.-]")[[1]] - remote <- if (length(components) == 4L) - paste("rstudio/renv", loadedversion, sep = "@") - else - paste("renv", loadedversion, sep = "@") - - fmt <- paste( - "renv %1$s was loaded from project library, but renv %2$s is recorded in lockfile.", - "Use `renv::record(\"%3$s\")` to record this version in the lockfile.", - "Use `renv::restore(packages = \"renv\")` to install renv %2$s into the project library.", - sep = "\n" + # load bootstrap tools + bootstrap <- function(version, library) { + + # read repos (respecting override if set) + repos <- Sys.getenv("RENV_CONFIG_REPOS_OVERRIDE", unset = NA) + if (is.na(repos)) + repos <- getOption("repos") + + # fix up repos + on.exit(options(repos = repos), add = TRUE) + repos[repos == "@CRAN@"] <- "https://cloud.r-project.org" + options(repos = repos) + + # attempt to download renv + tarball <- tryCatch(renv_bootstrap_download(version), error = identity) + if (inherits(tarball, "error")) + stop("failed to download renv ", version) + + # now attempt to install + status <- tryCatch(renv_bootstrap_install(version, tarball, library), error = identity) + if (inherits(status, "error")) + stop("failed to install renv ", version) + + } + + renv_bootstrap_download_impl <- function(url, destfile) { + + mode <- "wb" + + # https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17715 + fixup <- + Sys.info()[["sysname"]] == "Windows" && + substring(url, 1L, 5L) == "file:" + + if (fixup) + mode <- "w+b" + + download.file( + url = url, + destfile = destfile, + mode = mode, + quiet = TRUE + ) + + } + + renv_bootstrap_download <- function(version) { + + methods <- list( + renv_bootstrap_download_cran_latest, + renv_bootstrap_download_cran_archive, + renv_bootstrap_download_github + ) + + for (method in methods) { + path <- tryCatch(method(version), error = identity) + if (is.character(path) && file.exists(path)) + return(path) + } + + stop("failed to download renv ", version) + + } + + renv_bootstrap_download_cran_latest <- function(version) { + + # check for renv on CRAN matching this version + db <- as.data.frame(available.packages(), stringsAsFactors = FALSE) + + entry <- db[db$Package %in% "renv" & db$Version %in% version, ] + if (nrow(entry) == 0) { + fmt <- "renv %s is not available from your declared package repositories" + stop(sprintf(fmt, version)) + } + + message("* Downloading renv ", version, " from CRAN ... ", appendLF = FALSE) + + info <- tryCatch( + download.packages("renv", destdir = tempdir()), + condition = identity + ) + + if (inherits(info, "condition")) { + message("FAILED") + return(FALSE) + } + + message("OK") + info[1, 2] + + } + + renv_bootstrap_download_cran_archive <- function(version) { + + name <- sprintf("renv_%s.tar.gz", version) + repos <- getOption("repos") + urls <- file.path(repos, "src/contrib/Archive/renv", name) + destfile <- file.path(tempdir(), name) + + message("* Downloading renv ", version, " from CRAN archive ... ", appendLF = FALSE) + + for (url in urls) { + + status <- tryCatch( + renv_bootstrap_download_impl(url, destfile), + condition = identity ) - - msg <- sprintf(fmt, loadedversion, version, remote) - warning(msg, call. = FALSE) - + + if (identical(status, 0L)) { + message("OK") + return(destfile) + } + } - - # load the project - return(renv::load()) - + + message("FAILED") + return(FALSE) + } - - # failed to find renv locally; we'll try to install from GitHub. - # first, set up download options as appropriate (try to use GITHUB_PAT) - install_renv <- function() { - - message("Failed to find installation of renv -- attempting to bootstrap...") - - # ensure .Rprofile doesn't get executed - rpu <- Sys.getenv("R_PROFILE_USER", unset = NA) - Sys.setenv(R_PROFILE_USER = "") - on.exit({ - if (is.na(rpu)) - Sys.unsetenv("R_PROFILE_USER") - else - Sys.setenv(R_PROFILE_USER = rpu) - }, add = TRUE) - + + renv_bootstrap_download_github <- function(version) { + + enabled <- Sys.getenv("RENV_BOOTSTRAP_FROM_GITHUB", unset = "TRUE") + if (!identical(enabled, "TRUE")) + return(FALSE) + # prepare download options pat <- Sys.getenv("GITHUB_PAT") if (nzchar(Sys.which("curl")) && nzchar(pat)) { @@ -115,58 +177,160 @@ local({ options(download.file.method = "wget", download.file.extra = extra) on.exit(do.call(base::options, saved), add = TRUE) } - - # fix up repos - repos <- getOption("repos") - on.exit(options(repos = repos), add = TRUE) - repos[repos == "@CRAN@"] <- "https://cloud.r-project.org" - options(repos = repos) - - # check for renv on CRAN matching this version - db <- as.data.frame(available.packages(), stringsAsFactors = FALSE) - if ("renv" %in% rownames(db)) { - entry <- db["renv", ] - if (identical(entry$Version, version)) { - message("* Installing renv ", version, " ... ", appendLF = FALSE) - dir.create(libpath, showWarnings = FALSE, recursive = TRUE) - utils::install.packages("renv", lib = libpath, quiet = TRUE) - message("Done!") - return(TRUE) - } + + message("* Downloading renv ", version, " from GitHub ... ", appendLF = FALSE) + + url <- file.path("https://api.github.com/repos/rstudio/renv/tarball", version) + name <- sprintf("renv_%s.tar.gz", version) + destfile <- file.path(tempdir(), name) + + status <- tryCatch( + renv_bootstrap_download_impl(url, destfile), + condition = identity + ) + + if (!identical(status, 0L)) { + message("FAILED") + return(FALSE) } - - # try to download renv - message("* Downloading renv ", version, " ... ", appendLF = FALSE) - prefix <- "https://api.github.com" - url <- file.path(prefix, "repos/rstudio/renv/tarball", version) - destfile <- tempfile("renv-", fileext = ".tar.gz") - on.exit(unlink(destfile), add = TRUE) - utils::download.file(url, destfile = destfile, mode = "wb", quiet = TRUE) + message("Done!") - + return(destfile) + + } + + renv_bootstrap_install <- function(version, tarball, library) { + # attempt to install it into project library message("* Installing renv ", version, " ... ", appendLF = FALSE) - dir.create(libpath, showWarnings = FALSE, recursive = TRUE) - + dir.create(library, showWarnings = FALSE, recursive = TRUE) + # invoke using system2 so we can capture and report output bin <- R.home("bin") exe <- if (Sys.info()[["sysname"]] == "Windows") "R.exe" else "R" r <- file.path(bin, exe) - args <- c("--vanilla", "CMD", "INSTALL", "-l", shQuote(libpath), shQuote(destfile)) + args <- c("--vanilla", "CMD", "INSTALL", "-l", shQuote(library), shQuote(tarball)) output <- system2(r, args, stdout = TRUE, stderr = TRUE) message("Done!") - + # check for successful install status <- attr(output, "status") if (is.numeric(status) && !identical(status, 0L)) { - text <- c("Error installing renv", "=====================", output) + header <- "Error installing renv:" + lines <- paste(rep.int("=", nchar(header)), collapse = "") + text <- c(header, lines, output) writeLines(text, con = stderr()) } + + status + + } + + renv_bootstrap_prefix <- function() { + + # construct version prefix + version <- paste(R.version$major, R.version$minor, sep = ".") + prefix <- paste("R", numeric_version(version)[1, 1:2], sep = "-") + + # include SVN revision for development versions of R + # (to avoid sharing platform-specific artefacts with released versions of R) + devel <- + identical(R.version[["status"]], "Under development (unstable)") || + identical(R.version[["nickname"]], "Unsuffered Consequences") + + if (devel) + prefix <- paste(prefix, R.version[["svn rev"]], sep = "-r") + + # build list of path components + components <- c(prefix, R.version$platform) + + # include prefix if provided by user + prefix <- Sys.getenv("RENV_PATHS_PREFIX") + if (nzchar(prefix)) + components <- c(prefix, components) + + # build prefix + paste(components, collapse = "/") + + } + + renv_bootstrap_library_root <- function(project) { + + path <- Sys.getenv("RENV_PATHS_LIBRARY", unset = NA) + if (!is.na(path)) + return(path) + + path <- Sys.getenv("RENV_PATHS_LIBRARY_ROOT", unset = NA) + if (!is.na(path)) + return(file.path(path, basename(project))) + + file.path(project, "renv/library") + + } + + renv_bootstrap_validate_version <- function(version) { + + loadedversion <- utils::packageDescription("renv", fields = "Version") + if (version == loadedversion) + return(TRUE) + + # assume four-component versions are from GitHub; three-component + # versions are from CRAN + components <- strsplit(loadedversion, "[.-]")[[1]] + remote <- if (length(components) == 4L) + paste("rstudio/renv", loadedversion, sep = "@") + else + paste("renv", loadedversion, sep = "@") + + fmt <- paste( + "renv %1$s was loaded from project library, but renv %2$s is recorded in lockfile.", + "Use `renv::record(\"%3$s\")` to record this version in the lockfile.", + "Use `renv::restore(packages = \"renv\")` to install renv %2$s into the project library.", + sep = "\n" + ) + + msg <- sprintf(fmt, loadedversion, version, remote) + warning(msg, call. = FALSE) + + FALSE + + } + + renv_bootstrap_load <- function(project, libpath, version) { + + # try to load renv from the project library + if (!requireNamespace("renv", lib.loc = libpath, quietly = TRUE)) + return(FALSE) + + # warn if the version of renv loaded does not match + renv_bootstrap_validate_version(version) + + # load the project + renv::load(project) + + TRUE + + } + # construct path to library root + root <- renv_bootstrap_library_root(project) - } + # construct library prefix for platform + prefix <- renv_bootstrap_prefix() + + # construct full libpath + libpath <- file.path(root, prefix) + + # attempt to load + if (renv_bootstrap_load(project, libpath, version)) + return(TRUE) + + # load failed; attempt to bootstrap + bootstrap(version, libpath) - try(install_renv()) + # exit early if we're just testing bootstrap + if (!is.na(Sys.getenv("RENV_BOOTSTRAP_INSTALL_ONLY", unset = NA))) + return(TRUE) # try again to load if (requireNamespace("renv", lib.loc = libpath, quietly = TRUE)) { diff --git a/02_otec/ESTADOS/ESTADOS.dbf b/sistemas_informacion_geografica/buffer/ESTADOS/ESTADOS.dbf similarity index 100% rename from 02_otec/ESTADOS/ESTADOS.dbf rename to sistemas_informacion_geografica/buffer/ESTADOS/ESTADOS.dbf diff --git a/02_otec/ESTADOS/ESTADOS.prj b/sistemas_informacion_geografica/buffer/ESTADOS/ESTADOS.prj similarity index 100% rename from 02_otec/ESTADOS/ESTADOS.prj rename to sistemas_informacion_geografica/buffer/ESTADOS/ESTADOS.prj diff --git a/02_otec/ESTADOS/ESTADOS.shp b/sistemas_informacion_geografica/buffer/ESTADOS/ESTADOS.shp similarity index 100% rename from 02_otec/ESTADOS/ESTADOS.shp rename to sistemas_informacion_geografica/buffer/ESTADOS/ESTADOS.shp diff --git a/02_otec/ESTADOS/ESTADOS.shx b/sistemas_informacion_geografica/buffer/ESTADOS/ESTADOS.shx similarity index 100% rename from 02_otec/ESTADOS/ESTADOS.shx rename to sistemas_informacion_geografica/buffer/ESTADOS/ESTADOS.shx diff --git a/04_buffer/MUNICIPIOS/MUNICIPIOS.dbf b/sistemas_informacion_geografica/buffer/MUNICIPIOS/MUNICIPIOS.dbf similarity index 100% rename from 04_buffer/MUNICIPIOS/MUNICIPIOS.dbf rename to sistemas_informacion_geografica/buffer/MUNICIPIOS/MUNICIPIOS.dbf diff --git a/04_buffer/MUNICIPIOS/MUNICIPIOS.prj b/sistemas_informacion_geografica/buffer/MUNICIPIOS/MUNICIPIOS.prj similarity index 100% rename from 04_buffer/MUNICIPIOS/MUNICIPIOS.prj rename to sistemas_informacion_geografica/buffer/MUNICIPIOS/MUNICIPIOS.prj diff --git a/04_buffer/MUNICIPIOS/MUNICIPIOS.shp b/sistemas_informacion_geografica/buffer/MUNICIPIOS/MUNICIPIOS.shp similarity index 100% rename from 04_buffer/MUNICIPIOS/MUNICIPIOS.shp rename to sistemas_informacion_geografica/buffer/MUNICIPIOS/MUNICIPIOS.shp diff --git a/04_buffer/MUNICIPIOS/MUNICIPIOS.shx b/sistemas_informacion_geografica/buffer/MUNICIPIOS/MUNICIPIOS.shx similarity index 100% rename from 04_buffer/MUNICIPIOS/MUNICIPIOS.shx rename to sistemas_informacion_geografica/buffer/MUNICIPIOS/MUNICIPIOS.shx diff --git "a/04_buffer/M\303\251xico_Hidrografia/M\303\251xico_Hidrografia.dbf" "b/sistemas_informacion_geografica/buffer/M\303\251xico_Hidrografia/M\303\251xico_Hidrografia.dbf" similarity index 100% rename from "04_buffer/M\303\251xico_Hidrografia/M\303\251xico_Hidrografia.dbf" rename to "sistemas_informacion_geografica/buffer/M\303\251xico_Hidrografia/M\303\251xico_Hidrografia.dbf" diff --git "a/04_buffer/M\303\251xico_Hidrografia/M\303\251xico_Hidrografia.prj" "b/sistemas_informacion_geografica/buffer/M\303\251xico_Hidrografia/M\303\251xico_Hidrografia.prj" similarity index 100% rename from "04_buffer/M\303\251xico_Hidrografia/M\303\251xico_Hidrografia.prj" rename to "sistemas_informacion_geografica/buffer/M\303\251xico_Hidrografia/M\303\251xico_Hidrografia.prj" diff --git "a/04_buffer/M\303\251xico_Hidrografia/M\303\251xico_Hidrografia.sbn" "b/sistemas_informacion_geografica/buffer/M\303\251xico_Hidrografia/M\303\251xico_Hidrografia.sbn" similarity index 100% rename from "04_buffer/M\303\251xico_Hidrografia/M\303\251xico_Hidrografia.sbn" rename to "sistemas_informacion_geografica/buffer/M\303\251xico_Hidrografia/M\303\251xico_Hidrografia.sbn" diff --git "a/04_buffer/M\303\251xico_Hidrografia/M\303\251xico_Hidrografia.sbx" "b/sistemas_informacion_geografica/buffer/M\303\251xico_Hidrografia/M\303\251xico_Hidrografia.sbx" similarity index 100% rename from "04_buffer/M\303\251xico_Hidrografia/M\303\251xico_Hidrografia.sbx" rename to "sistemas_informacion_geografica/buffer/M\303\251xico_Hidrografia/M\303\251xico_Hidrografia.sbx" diff --git "a/04_buffer/M\303\251xico_Hidrografia/M\303\251xico_Hidrografia.shp" "b/sistemas_informacion_geografica/buffer/M\303\251xico_Hidrografia/M\303\251xico_Hidrografia.shp" similarity index 100% rename from "04_buffer/M\303\251xico_Hidrografia/M\303\251xico_Hidrografia.shp" rename to "sistemas_informacion_geografica/buffer/M\303\251xico_Hidrografia/M\303\251xico_Hidrografia.shp" diff --git "a/04_buffer/M\303\251xico_Hidrografia/M\303\251xico_Hidrografia.shp.xml" "b/sistemas_informacion_geografica/buffer/M\303\251xico_Hidrografia/M\303\251xico_Hidrografia.shp.xml" similarity index 100% rename from "04_buffer/M\303\251xico_Hidrografia/M\303\251xico_Hidrografia.shp.xml" rename to "sistemas_informacion_geografica/buffer/M\303\251xico_Hidrografia/M\303\251xico_Hidrografia.shp.xml" diff --git "a/04_buffer/M\303\251xico_Hidrografia/M\303\251xico_Hidrografia.shx" "b/sistemas_informacion_geografica/buffer/M\303\251xico_Hidrografia/M\303\251xico_Hidrografia.shx" similarity index 100% rename from "04_buffer/M\303\251xico_Hidrografia/M\303\251xico_Hidrografia.shx" rename to "sistemas_informacion_geografica/buffer/M\303\251xico_Hidrografia/M\303\251xico_Hidrografia.shx" diff --git "a/04_buffer/M\303\251xico_Hidrografia/M\303\251xico_Hidrografia_LEEME.txt" "b/sistemas_informacion_geografica/buffer/M\303\251xico_Hidrografia/M\303\251xico_Hidrografia_LEEME.txt" similarity index 100% rename from "04_buffer/M\303\251xico_Hidrografia/M\303\251xico_Hidrografia_LEEME.txt" rename to "sistemas_informacion_geografica/buffer/M\303\251xico_Hidrografia/M\303\251xico_Hidrografia_LEEME.txt" diff --git "a/04_buffer/M\303\251xico_Lagos/M\303\251xico_Lagos.dbf" "b/sistemas_informacion_geografica/buffer/M\303\251xico_Lagos/M\303\251xico_Lagos.dbf" similarity index 100% rename from "04_buffer/M\303\251xico_Lagos/M\303\251xico_Lagos.dbf" rename to "sistemas_informacion_geografica/buffer/M\303\251xico_Lagos/M\303\251xico_Lagos.dbf" diff --git "a/04_buffer/M\303\251xico_Lagos/M\303\251xico_Lagos.prj" "b/sistemas_informacion_geografica/buffer/M\303\251xico_Lagos/M\303\251xico_Lagos.prj" similarity index 100% rename from "04_buffer/M\303\251xico_Lagos/M\303\251xico_Lagos.prj" rename to "sistemas_informacion_geografica/buffer/M\303\251xico_Lagos/M\303\251xico_Lagos.prj" diff --git "a/04_buffer/M\303\251xico_Lagos/M\303\251xico_Lagos.sbn" "b/sistemas_informacion_geografica/buffer/M\303\251xico_Lagos/M\303\251xico_Lagos.sbn" similarity index 100% rename from "04_buffer/M\303\251xico_Lagos/M\303\251xico_Lagos.sbn" rename to "sistemas_informacion_geografica/buffer/M\303\251xico_Lagos/M\303\251xico_Lagos.sbn" diff --git "a/04_buffer/M\303\251xico_Lagos/M\303\251xico_Lagos.sbx" "b/sistemas_informacion_geografica/buffer/M\303\251xico_Lagos/M\303\251xico_Lagos.sbx" similarity index 100% rename from "04_buffer/M\303\251xico_Lagos/M\303\251xico_Lagos.sbx" rename to "sistemas_informacion_geografica/buffer/M\303\251xico_Lagos/M\303\251xico_Lagos.sbx" diff --git "a/04_buffer/M\303\251xico_Lagos/M\303\251xico_Lagos.shp" "b/sistemas_informacion_geografica/buffer/M\303\251xico_Lagos/M\303\251xico_Lagos.shp" similarity index 100% rename from "04_buffer/M\303\251xico_Lagos/M\303\251xico_Lagos.shp" rename to "sistemas_informacion_geografica/buffer/M\303\251xico_Lagos/M\303\251xico_Lagos.shp" diff --git "a/04_buffer/M\303\251xico_Lagos/M\303\251xico_Lagos.shp.xml" "b/sistemas_informacion_geografica/buffer/M\303\251xico_Lagos/M\303\251xico_Lagos.shp.xml" similarity index 100% rename from "04_buffer/M\303\251xico_Lagos/M\303\251xico_Lagos.shp.xml" rename to "sistemas_informacion_geografica/buffer/M\303\251xico_Lagos/M\303\251xico_Lagos.shp.xml" diff --git "a/04_buffer/M\303\251xico_Lagos/M\303\251xico_Lagos.shx" "b/sistemas_informacion_geografica/buffer/M\303\251xico_Lagos/M\303\251xico_Lagos.shx" similarity index 100% rename from "04_buffer/M\303\251xico_Lagos/M\303\251xico_Lagos.shx" rename to "sistemas_informacion_geografica/buffer/M\303\251xico_Lagos/M\303\251xico_Lagos.shx" diff --git "a/04_buffer/M\303\251xico_Lagos/M\303\251xico_Lagos_LEEME.txt" "b/sistemas_informacion_geografica/buffer/M\303\251xico_Lagos/M\303\251xico_Lagos_LEEME.txt" similarity index 100% rename from "04_buffer/M\303\251xico_Lagos/M\303\251xico_Lagos_LEEME.txt" rename to "sistemas_informacion_geografica/buffer/M\303\251xico_Lagos/M\303\251xico_Lagos_LEEME.txt" diff --git a/04_buffer/buffer_practica.R b/sistemas_informacion_geografica/buffer/practica.R similarity index 68% rename from 04_buffer/buffer_practica.R rename to sistemas_informacion_geografica/buffer/practica.R index fe98198..deee7e9 100644 --- a/04_buffer/buffer_practica.R +++ b/sistemas_informacion_geografica/buffer/practica.R @@ -1,9 +1,22 @@ # Práctica: Contaminación del Río Santiago +# +# “La Comisión solicita a México que adopte las medidas necesarias para preservar +# la vida, integridad personal y salud de los pobladores de las zonas hasta 5 kilómetros +# del Río Santiago en los municipios de Juanacatlán y El Salto, así como de los +# pobladores de las localidades de San Pedro Itzicán, Agua Caliente, Chalpicote y +# Mezcala en el municipio de Poncitlán, Estado de Jalisco, señalados en la solicitud”, +# señala un comunicado de la Comisión Interamericana de Derechos Humanos (CIDH). +# +# Enlace de la nota: +# https://www.milenio.com/ciencia-y-salud/medioambiente/rio-santiago-comision-interamericana-otorga-medidas-cautelares +# +# # Objetivo de la práctica: Construir un mapa que muestre la zona delimitada por +# la CIDH, delimitado a los municipios mencionados en la nota. library(sf) library(rgdal) library(dplyr) library(tmap) -setwd("04_buffer/") +setwd("sistemas_informacion_geografica/buffer/") # Mapa del país por división política # Fuente: INEGI @@ -25,7 +38,7 @@ jalisco_mun <- # Mapa del Río Santiago en Jalisco # Fuente: Carlos Efraín Porto Tapiquén. Orogénesis Soluciones Geográficas. Porlamar, Venezuela, 2015 -rio_santiago <- read_sf("México_Hidrografia") %>% +rio_santiago <- read_sf("México_Hidrografia") %>% filter(CUENCA == "Río Grande de Santiago") %>% st_transform(crs = st_crs(estados)) @@ -36,7 +49,7 @@ rio_santiago_buffer <- rio_santiago %>% # Mapa del Lago Chapala en Jalisco # Fuente: Carlos Efraín Porto Tapiquén. Orogénesis Soluciones Geográficas. Porlamar, Venezuela, 2015 -lago_chapala <- read_sf("México_Lagos") %>% +lago_chapala <- read_sf("México_Lagos") %>% filter(NOMBRE == "Lago de Chapala") %>% st_transform(crs = st_crs(estados)) @@ -74,4 +87,4 @@ tm_shape(estados, bbox = st_bbox(jalisco)) + ) dev.off() -setwd("../") +setwd("../../") diff --git a/03_heatmaps/crime-incidents-2010.shapefile/crime-incidents-2010.dbf b/sistemas_informacion_geografica/heatmaps/crime-incidents-2010.shapefile/crime-incidents-2010.dbf similarity index 100% rename from 03_heatmaps/crime-incidents-2010.shapefile/crime-incidents-2010.dbf rename to sistemas_informacion_geografica/heatmaps/crime-incidents-2010.shapefile/crime-incidents-2010.dbf diff --git a/03_heatmaps/crime-incidents-2010.shapefile/crime-incidents-2010.prj b/sistemas_informacion_geografica/heatmaps/crime-incidents-2010.shapefile/crime-incidents-2010.prj similarity index 100% rename from 03_heatmaps/crime-incidents-2010.shapefile/crime-incidents-2010.prj rename to sistemas_informacion_geografica/heatmaps/crime-incidents-2010.shapefile/crime-incidents-2010.prj diff --git a/03_heatmaps/crime-incidents-2010.shapefile/crime-incidents-2010.shp b/sistemas_informacion_geografica/heatmaps/crime-incidents-2010.shapefile/crime-incidents-2010.shp similarity index 100% rename from 03_heatmaps/crime-incidents-2010.shapefile/crime-incidents-2010.shp rename to sistemas_informacion_geografica/heatmaps/crime-incidents-2010.shapefile/crime-incidents-2010.shp diff --git a/03_heatmaps/crime-incidents-2010.shapefile/crime-incidents-2010.shx b/sistemas_informacion_geografica/heatmaps/crime-incidents-2010.shapefile/crime-incidents-2010.shx similarity index 100% rename from 03_heatmaps/crime-incidents-2010.shapefile/crime-incidents-2010.shx rename to sistemas_informacion_geografica/heatmaps/crime-incidents-2010.shapefile/crime-incidents-2010.shx diff --git a/03_heatmaps/practicaHeatMaps.R b/sistemas_informacion_geografica/heatmaps/practica.R similarity index 87% rename from 03_heatmaps/practicaHeatMaps.R rename to sistemas_informacion_geografica/heatmaps/practica.R index 6a8beb0..dea0364 100644 --- a/03_heatmaps/practicaHeatMaps.R +++ b/sistemas_informacion_geografica/heatmaps/practica.R @@ -1,10 +1,15 @@ # Práctica: Mapas de Calor +# +# Objetivo de la práctica: Construir mapas de calor para mostrar la distribución +# de incidentes delictivos en la ciudad de San Diego, California. Específicamente, +# el hurto con allanamiento de morada (burglary), el cual puede presentar patrones +# diurnos y nocturnos distintos. library(sf) library(raster) library(spatialEco) library(dplyr) library(tmap) -setwd("03_heatmaps/") +setwd("sistemas_informacion_geografica/heatmaps/") # Mapa de San Diego # Fuente: City of San Diego Open Data Portal @@ -90,4 +95,4 @@ tm_shape(heatmaps, bbox = san_diego_bbox) + ) dev.off() -setwd("../") +setwd("../../") diff --git a/03_heatmaps/san_diego_boundary_datasd/san_diego_boundary_datasd.cpg b/sistemas_informacion_geografica/heatmaps/san_diego_boundary_datasd/san_diego_boundary_datasd.cpg similarity index 100% rename from 03_heatmaps/san_diego_boundary_datasd/san_diego_boundary_datasd.cpg rename to sistemas_informacion_geografica/heatmaps/san_diego_boundary_datasd/san_diego_boundary_datasd.cpg diff --git a/03_heatmaps/san_diego_boundary_datasd/san_diego_boundary_datasd.dbf b/sistemas_informacion_geografica/heatmaps/san_diego_boundary_datasd/san_diego_boundary_datasd.dbf similarity index 100% rename from 03_heatmaps/san_diego_boundary_datasd/san_diego_boundary_datasd.dbf rename to sistemas_informacion_geografica/heatmaps/san_diego_boundary_datasd/san_diego_boundary_datasd.dbf diff --git a/03_heatmaps/san_diego_boundary_datasd/san_diego_boundary_datasd.prj b/sistemas_informacion_geografica/heatmaps/san_diego_boundary_datasd/san_diego_boundary_datasd.prj similarity index 100% rename from 03_heatmaps/san_diego_boundary_datasd/san_diego_boundary_datasd.prj rename to sistemas_informacion_geografica/heatmaps/san_diego_boundary_datasd/san_diego_boundary_datasd.prj diff --git a/03_heatmaps/san_diego_boundary_datasd/san_diego_boundary_datasd.shp b/sistemas_informacion_geografica/heatmaps/san_diego_boundary_datasd/san_diego_boundary_datasd.shp similarity index 100% rename from 03_heatmaps/san_diego_boundary_datasd/san_diego_boundary_datasd.shp rename to sistemas_informacion_geografica/heatmaps/san_diego_boundary_datasd/san_diego_boundary_datasd.shp diff --git a/03_heatmaps/san_diego_boundary_datasd/san_diego_boundary_datasd.shx b/sistemas_informacion_geografica/heatmaps/san_diego_boundary_datasd/san_diego_boundary_datasd.shx similarity index 100% rename from 03_heatmaps/san_diego_boundary_datasd/san_diego_boundary_datasd.shx rename to sistemas_informacion_geografica/heatmaps/san_diego_boundary_datasd/san_diego_boundary_datasd.shx diff --git a/01_incidencia_delictiva_nac/01_poblacion.xls b/sistemas_informacion_geografica/incidencia_delictiva_nacional/01_poblacion.xls similarity index 100% rename from 01_incidencia_delictiva_nac/01_poblacion.xls rename to sistemas_informacion_geografica/incidencia_delictiva_nacional/01_poblacion.xls diff --git a/01_incidencia_delictiva_nac/Estatal-Delitos - diciembre 2019.xlsb b/sistemas_informacion_geografica/incidencia_delictiva_nacional/Estatal-Delitos - diciembre 2019.xlsb similarity index 100% rename from 01_incidencia_delictiva_nac/Estatal-Delitos - diciembre 2019.xlsb rename to sistemas_informacion_geografica/incidencia_delictiva_nacional/Estatal-Delitos - diciembre 2019.xlsb diff --git a/01_incidencia_delictiva_nac/destdv250k_2gw/destdv250k_2gw.dbf b/sistemas_informacion_geografica/incidencia_delictiva_nacional/destdv250k_2gw/destdv250k_2gw.dbf similarity index 100% rename from 01_incidencia_delictiva_nac/destdv250k_2gw/destdv250k_2gw.dbf rename to sistemas_informacion_geografica/incidencia_delictiva_nacional/destdv250k_2gw/destdv250k_2gw.dbf diff --git a/01_incidencia_delictiva_nac/destdv250k_2gw/destdv250k_2gw.html b/sistemas_informacion_geografica/incidencia_delictiva_nacional/destdv250k_2gw/destdv250k_2gw.html similarity index 100% rename from 01_incidencia_delictiva_nac/destdv250k_2gw/destdv250k_2gw.html rename to sistemas_informacion_geografica/incidencia_delictiva_nacional/destdv250k_2gw/destdv250k_2gw.html diff --git a/01_incidencia_delictiva_nac/destdv250k_2gw/destdv250k_2gw.png b/sistemas_informacion_geografica/incidencia_delictiva_nacional/destdv250k_2gw/destdv250k_2gw.png similarity index 100% rename from 01_incidencia_delictiva_nac/destdv250k_2gw/destdv250k_2gw.png rename to sistemas_informacion_geografica/incidencia_delictiva_nacional/destdv250k_2gw/destdv250k_2gw.png diff --git a/01_incidencia_delictiva_nac/destdv250k_2gw/destdv250k_2gw.prj b/sistemas_informacion_geografica/incidencia_delictiva_nacional/destdv250k_2gw/destdv250k_2gw.prj similarity index 100% rename from 01_incidencia_delictiva_nac/destdv250k_2gw/destdv250k_2gw.prj rename to sistemas_informacion_geografica/incidencia_delictiva_nacional/destdv250k_2gw/destdv250k_2gw.prj diff --git a/01_incidencia_delictiva_nac/destdv250k_2gw/destdv250k_2gw.shp b/sistemas_informacion_geografica/incidencia_delictiva_nacional/destdv250k_2gw/destdv250k_2gw.shp similarity index 100% rename from 01_incidencia_delictiva_nac/destdv250k_2gw/destdv250k_2gw.shp rename to sistemas_informacion_geografica/incidencia_delictiva_nacional/destdv250k_2gw/destdv250k_2gw.shp diff --git a/01_incidencia_delictiva_nac/destdv250k_2gw/destdv250k_2gw.shx b/sistemas_informacion_geografica/incidencia_delictiva_nacional/destdv250k_2gw/destdv250k_2gw.shx similarity index 100% rename from 01_incidencia_delictiva_nac/destdv250k_2gw/destdv250k_2gw.shx rename to sistemas_informacion_geografica/incidencia_delictiva_nacional/destdv250k_2gw/destdv250k_2gw.shx diff --git a/01_incidencia_delictiva_nac/destdv250k_2gw/destdv250k_2gw.xml b/sistemas_informacion_geografica/incidencia_delictiva_nacional/destdv250k_2gw/destdv250k_2gw.xml similarity index 100% rename from 01_incidencia_delictiva_nac/destdv250k_2gw/destdv250k_2gw.xml rename to sistemas_informacion_geografica/incidencia_delictiva_nacional/destdv250k_2gw/destdv250k_2gw.xml diff --git a/01_incidencia_delictiva_nac/destdv250k_2gw/destdv250k_2gw_s.png b/sistemas_informacion_geografica/incidencia_delictiva_nacional/destdv250k_2gw/destdv250k_2gw_s.png similarity index 100% rename from 01_incidencia_delictiva_nac/destdv250k_2gw/destdv250k_2gw_s.png rename to sistemas_informacion_geografica/incidencia_delictiva_nacional/destdv250k_2gw/destdv250k_2gw_s.png diff --git a/01_incidencia_delictiva_nac/practica_1.R b/sistemas_informacion_geografica/incidencia_delictiva_nacional/practica.R similarity index 86% rename from 01_incidencia_delictiva_nac/practica_1.R rename to sistemas_informacion_geografica/incidencia_delictiva_nacional/practica.R index 64a4c37..90d9b79 100644 --- a/01_incidencia_delictiva_nac/practica_1.R +++ b/sistemas_informacion_geografica/incidencia_delictiva_nacional/practica.R @@ -1,4 +1,7 @@ # Práctica: Incidencia Delictiva Nacional +# +# Objetivo de la práctica: Construir mapas temáticos que muestren la incidencia +# delictiva en los estados de la República Mexicana durante los últimos años. library(RODBC) library(readxl) library(tidyr) @@ -6,10 +9,15 @@ library(dplyr) library(stringr) library(sf) library(cartography) -setwd("01_incidencia_delictiva_nac/") +setwd("sistemas_informacion_geografica/incidencia_delictiva_nacional/") # Incidencia delictiva del fuero común # Fuente: Secretariado Ejecutivo del Sistema Nacional de Seguridad Pública +# +# Nota: Para poder usar esta función es necesario tener instalado el "Componente +# redistribuible del motor de base de datos de Microsoft Access 2010", el cual +# se puede descargar desde el siguiente enlace: +# https://www.microsoft.com/en-US/download/details.aspx?id=13255 seg_pub_db <- odbcConnectExcel2007("Estatal-Delitos - diciembre 2019.xlsb") seg_pub <- as_tibble(sqlFetch(seg_pub_db, "Hoja1$")) %>% @@ -33,10 +41,10 @@ polig_est <- read_sf("destdv250k_2gw/destdv250k_2gw.shp") %>% summarise() %>% mutate_at(vars(Entidad), list(~str_to_title(., locale = "es"))) -# Filtro: Homocidios dolosos por arma de fuego +# Filtro: Homicidios dolosos por arma de fuego # Datos agrupados por año y por entidad hom_dol_arma_fuego <- seg_pub %>% - # Obtención de los homocidios dolosos por arma de fuego + # Obtención de los homicidios dolosos por arma de fuego filter(`Subtipo de delito` == "Homicidio doloso", Modalidad == "Con arma de fuego") %>% select(-one_of("Bien jurídico afectado", "Tipo de delito", "Subtipo de delito", "Modalidad")) %>% pivot_longer( @@ -132,4 +140,4 @@ for (info_anio in tasa_hom_anio) { } dev.off() -setwd("../") +setwd("../../") diff --git a/04_buffer/ESTADOS/ESTADOS.dbf b/sistemas_informacion_geografica/tecnologia_OTEC/ESTADOS/ESTADOS.dbf similarity index 100% rename from 04_buffer/ESTADOS/ESTADOS.dbf rename to sistemas_informacion_geografica/tecnologia_OTEC/ESTADOS/ESTADOS.dbf diff --git a/04_buffer/ESTADOS/ESTADOS.prj b/sistemas_informacion_geografica/tecnologia_OTEC/ESTADOS/ESTADOS.prj similarity index 100% rename from 04_buffer/ESTADOS/ESTADOS.prj rename to sistemas_informacion_geografica/tecnologia_OTEC/ESTADOS/ESTADOS.prj diff --git a/04_buffer/ESTADOS/ESTADOS.shp b/sistemas_informacion_geografica/tecnologia_OTEC/ESTADOS/ESTADOS.shp similarity index 100% rename from 04_buffer/ESTADOS/ESTADOS.shp rename to sistemas_informacion_geografica/tecnologia_OTEC/ESTADOS/ESTADOS.shp diff --git a/04_buffer/ESTADOS/ESTADOS.shx b/sistemas_informacion_geografica/tecnologia_OTEC/ESTADOS/ESTADOS.shx similarity index 100% rename from 04_buffer/ESTADOS/ESTADOS.shx rename to sistemas_informacion_geografica/tecnologia_OTEC/ESTADOS/ESTADOS.shx diff --git a/02_otec/ESTADOS/mexico.cpg b/sistemas_informacion_geografica/tecnologia_OTEC/ESTADOS/mexico.cpg similarity index 100% rename from 02_otec/ESTADOS/mexico.cpg rename to sistemas_informacion_geografica/tecnologia_OTEC/ESTADOS/mexico.cpg diff --git a/02_otec/ESTADOS/mexico.dbf b/sistemas_informacion_geografica/tecnologia_OTEC/ESTADOS/mexico.dbf similarity index 100% rename from 02_otec/ESTADOS/mexico.dbf rename to sistemas_informacion_geografica/tecnologia_OTEC/ESTADOS/mexico.dbf diff --git a/02_otec/ESTADOS/mexico.prj b/sistemas_informacion_geografica/tecnologia_OTEC/ESTADOS/mexico.prj similarity index 100% rename from 02_otec/ESTADOS/mexico.prj rename to sistemas_informacion_geografica/tecnologia_OTEC/ESTADOS/mexico.prj diff --git a/02_otec/ESTADOS/mexico.qpj b/sistemas_informacion_geografica/tecnologia_OTEC/ESTADOS/mexico.qpj similarity index 100% rename from 02_otec/ESTADOS/mexico.qpj rename to sistemas_informacion_geografica/tecnologia_OTEC/ESTADOS/mexico.qpj diff --git a/02_otec/ESTADOS/mexico.shp b/sistemas_informacion_geografica/tecnologia_OTEC/ESTADOS/mexico.shp similarity index 100% rename from 02_otec/ESTADOS/mexico.shp rename to sistemas_informacion_geografica/tecnologia_OTEC/ESTADOS/mexico.shp diff --git a/02_otec/ESTADOS/mexico.shx b/sistemas_informacion_geografica/tecnologia_OTEC/ESTADOS/mexico.shx similarity index 100% rename from 02_otec/ESTADOS/mexico.shx rename to sistemas_informacion_geografica/tecnologia_OTEC/ESTADOS/mexico.shx diff --git a/02_otec/etopo1_bedrock.tif b/sistemas_informacion_geografica/tecnologia_OTEC/etopo1_bedrock.tif similarity index 100% rename from 02_otec/etopo1_bedrock.tif rename to sistemas_informacion_geografica/tecnologia_OTEC/etopo1_bedrock.tif diff --git a/02_otec/PracticaOTEC.R b/sistemas_informacion_geografica/tecnologia_OTEC/practica.R similarity index 78% rename from 02_otec/PracticaOTEC.R rename to sistemas_informacion_geografica/tecnologia_OTEC/practica.R index 4e978b4..b1dfa07 100644 --- a/02_otec/PracticaOTEC.R +++ b/sistemas_informacion_geografica/tecnologia_OTEC/practica.R @@ -1,11 +1,22 @@ -# Práctica: OTEC +# Práctica: Tecnología OTEC +# +# Objetivo de la práctica: Localizar sitios en el Mar Caribe con potencial para +# instalación de tecnología OTEC. +# +# Nota: La tecnología OTEC permite generar energía eléctrica en zonas marinas +# aprovechando la diferencia de temperatura entre la superficie y el fondo marino. +# Para ello es necesario ubicar sitios con profundidad entre 700 y 1000 metros +# ubicados a menos de 15 km de la costa. +# +# Más información: +# https://cemieoceano.mx/energia-gradientes-termicos.html library(sf) library(rgdal) library(gdalUtils) library(dplyr) library(cartography) library(tmap) -setwd("02_otec/") +setwd("sistemas_informacion_geografica/tecnologia_OTEC/") # Polígonos estatales # Fuente: INEGI @@ -87,4 +98,4 @@ tm_shape(mar_caribe.osm) + ) dev.off() -setwd("../") +setwd("../../")