{"id":16704019,"url":"https://github.com/csaybar/rgee_documentation","last_synced_at":"2026-02-09T15:33:20.863Z","repository":{"id":134359773,"uuid":"236676916","full_name":"csaybar/rgee_documentation","owner":"csaybar","description":null,"archived":false,"fork":false,"pushed_at":"2020-01-27T16:17:13.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-09T22:11:48.497Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/csaybar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-28T07:02:19.000Z","updated_at":"2022-11-30T09:14:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"89a40925-cff0-4bcb-8f87-8ac9e533d6d9","html_url":"https://github.com/csaybar/rgee_documentation","commit_stats":{"total_commits":10,"total_committers":1,"mean_commits":10.0,"dds":0.0,"last_synced_commit":"e2c82f9bb1930c5d28bed7c6d232c4c7fa513d0a"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csaybar%2Frgee_documentation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csaybar%2Frgee_documentation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csaybar%2Frgee_documentation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csaybar%2Frgee_documentation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csaybar","download_url":"https://codeload.github.com/csaybar/rgee_documentation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243545870,"owners_count":20308410,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T19:10:47.276Z","updated_at":"2026-02-09T15:33:15.657Z","avatar_url":"https://github.com/csaybar.png","language":null,"readme":"## 1) Load libraries\n```r\nlibrary(rgee)\nlibrary(sf)\nlibrary(cptcity)\nlibrary(mapview)\nlibrary(leaflet)\n```\n\nInitialize earthengine\n```r\nee_Initialize() \n```\n\n## 2) Map visualization with ee_map\nLoad color palete \n```r\ncpt_pal = cpt(pal = \"mpl_inferno\")\n```\nLoad SRTM satellite image and create a visualization on leaflet.\n```r\nimage \u003c- ee$Image('CGIAR/SRTM90_V4')\nee_map(image,\n       vizparams = list(min = 0, max = 5000, palette= cpt_pal),\n       zoom_start = 2,\n       objname = 'SRTM90_V4')\n```\n\n## 3) Sf map\nLoading a shapefile file with sf library and color palete\n```r\nnc = st_read(system.file(\"shape/nc.shp\", package=\"sf\"))\ncpt_pal \u003c- cpt(pal = \"wkp_schwarzwald_wiki_schwarzwald_cont\")\nnc_ee \u003c- nc %\u003e%\n  st_transform(4326) %\u003e%\n  sf_as_ee(check_ring_dir = TRUE)\n```\nClipping a image with a sf object\n```r\nclip_image \u003c- image$clip(nc_ee)\n```\nVisualizing the clip image with the st object\n```r\nmapview(nc, alpha.regions = 0, legend = FALSE) +\n  ee_map(clip_image,\n         vizparams = list(min = 0, max = 1000, palette= cpt_pal),\n         zoom_start = 6,\n         objname = 'SRTM',\n         quiet = TRUE)\n```\n\n## 4) Extract values from Earth Engine to sf\n```r\nnc_dem  \u003c- ee_extract(clip_image,nc_ee,id = \"FIPSNO\") %\u003e%\n  `names\u003c-`(c(\"FIPSNO\",'SRTM_DEM')) %\u003e%\n  merge(nc, .)\nplot(nc_dem['SRTM_DEM'])\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsaybar%2Frgee_documentation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsaybar%2Frgee_documentation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsaybar%2Frgee_documentation/lists"}