Date : 2022/04/24

Intallation Tutorial - Reference : Introduction to rgee (r-project.org)

Prerequisites :

1. A registered GEE acoount

2. A unrestricted-access VPN for google

3. A python package-management software , such as Anaconda

3. R and Rstudio

Process :

1. Install the 'rgee' package

2. Set up the dependent environment

3. Initialization

Step 1 : Install the 'rgee' package

First, start you Rtudio and create a new R file. Before your installation , set up your python interpreter in Rstudio.

! If you met with the following problem , try what the above picture shows.

> library(rgee)
Error: package or namespace load failed for ‘rgee’:
loadNamespace()里算'rgee'时.onLoad失败了,详细内容:
调用: py_module_import(module, convert = convert)
错误: ModuleNotFoundError: No module named 'ee'

Then install the 'rgee' package. Here is where you can install ,check and  update the R packages.

Step 2 : Set up the dependent environment

Now, we load the package, set up the python environment.

library(rgee)
#set up the python environment, do follow the prompt, enter [y] to restart R session.
# ! Only need set up one time, if set up successfully, you don't have to write this line code again.
ee_install()# if this doesn't work , try the next line code
ee_install(py_env = "rgee") # if this doesn't work , try the next line code
ee_install_set_pyenv(py_env = "rgee")

After that , we need check out if all done.

ee_check()

Return Success Symbol :
(*) Python version
√ [Ok] D:/Anaconda3/envs/rgee/python.exe v3.8
(*) Python packages:
√ [Ok] numpy
√ [Ok] earthengine-api

! If don't , maybe the rgee and earthengine-api version doesn't match, just update your rgee package in Rstudio.

Step 3 : Initialization

Here is the Big Big Problem . 

ee_Initialize() # You need to do it every time after loading the 'rgee' library.

Normally, you may encounter the following two problems:

√ email: not_defined
√ Initializing Google Earth Engine:

Error in py_call_impl(callable, dots$args, dots$keywords) :

1. TimeoutError: timed out [WinError 10060]

2. URLError: <urlopen error [WinError 10060]

I googled some solutions, but they didn't work, perhaps these attempts will solve your problems

## Solution 1 : clean up the environment then initialize
ee_clean_pyenv()
ee_Initialize() ## Solution 2 : Set the proxy then initialize
Sys.setenv(http_proxy='http://127.0.0.1:7890')
Sys.setenv(https_proxy='http://127.0.0.1:7890')
ee_Initialize()

Finally , I figured out the solution. It was unwise that I did not set system proxy , I just set up the browser proxy. 

So,  please make sure system proxy set up, then the initialization will succeess.

Step 4 : Enjoy working R with GEE

[ ^_^ ] If you have any problems , please comment on the box below.

R Works with Google Earth Engine - Installation 【rgee - 安装问题解决集锦】的更多相关文章

  1. Google Earth Engine城市水体提取

    Google Earth Engine城市水体提取 大家都知道城市水体提取相比较于山区,丘陵的地区,肯定是比较难的,为什么呢,因为城市水体有很多高层建筑导致的阴影,这个就非常复杂了,而且现在很多高分影 ...

  2. 基于google earth engine 云计算平台的全国水体变化研究

    第一个博客密码忘记了,今天才来开通第二个博客,时间已经过去两年了,三年的硕士生涯,真的是感慨良多,最有收获的一段时光,莫过于在实验室一个人敲着代码了,研三来得到中科院深圳先进院,在这里开始了新的研究生 ...

  3. Google Earth Engine学习资源分享

    最近在学习Google Earth Engine的使用,发现这个平台确实是一个非常好用.非常强大的平台.在GEE官网上找到了一些中文的学习资料,现在搬运过来分享给大家共同学习.教程分为两个部分 教程一 ...

  4. Google earth engine 绘制图像间散点图

    这段代码实现了在Google earth engine中绘制图像/波段间的散点图,得到相关关系.适用于探究数据间的相关性,进行数据的交叉验证. 代码来源于官方帮助:https://developers ...

  5. Google Earth Engine 中的位运算

    Google Earth Engine中的位运算 按位运算是编程中一个难点,同时也是在我们后续处理影像数据,尤其要使用影像自带的波段比如QA波段经常会用到的一个东西.通过按位运算我们可以筛选出我们想要 ...

  6. Google earth engine 中的投影、重采样、尺度

    本文主要翻译自下述GEE官方帮助 https://developers.google.com/earth-engine/guides/scale https://developers.google.c ...

  7. 基于Google Earth Engine的全国地表温度反演

    国内研究landsat8温度反演的人员很多,但是现有算法一般都是一景为例子,进行开展. 这有一个局限性,当研究的尺度很大时,就需要比较大的运算量了,例如全省温度,全国温度,全球温度,当然大家可能会说, ...

  8. 使用google earth engine根据NDWI(归一化水指数)提取水体信息

    交流合作请联系: ab000c@163.com

  9. 节能减排到底如何----google earth engine 告诉你!!

    (First,再次严谨说明,本人成果未经允许,切勿发表到相关学术期刊,如果有技术交流,qq1044625113,顺便打个广告,兼职GEE开发,欢迎联系!) 终于过了严寒的冬天,2017年的冬天中国南方 ...

  10. 基于google earth engine的中等分辨率全国水质反演

    我写博客的工作不像论文,假大空,我们直接上干货,之所以取一个这么大的名字,当然是我们能做到的... 不多说,我们对全国水体进行水质参数反演,不用MODIS,太粗,我们直接用哨兵,这样就可以直接做到大型 ...

随机推荐

  1. go_xml_learn

    结构体转换为xml: type Person struct { XMLName xml.Name `xml:"person"` Name string `xml:"nam ...

  2. 手把手教你玩转 Excel 数据透视表

    1.  什么是数据透视表 数据透视表是一种可以快速汇总.分析大量数据表格的交互式分析工具.使用数据透视表可以按照数据表格的不同字段从多个角度进行透视,并建立交叉表格,用以查看数据表格不同层面的汇总信息 ...

  3. 使用Git提交代码

    目录 1.提交前准备工作 2.代码提交步骤 3.从git上面拉代码 4.Git变更集 5.参考资料 1.提交前准备工作 首先去git官网下载git工具(Git GUI Here.Git Bash He ...

  4. Pytorch基础-张量基本操作

    一,张量的基本操作 二,维度变换 2.1,squeeze vs unsqueeze 维度增减 2.2,transpose vs permute 维度交换 三,索引切片 3.1,规则索引切片方式 3.2 ...

  5. python3进行3des的加密解密

    #秘钥长度正常24位,16位补齐第一个八位 import pyDes import base64 print('=======key1=======') keys='1234567890123456' ...

  6. STL容器vector

    一.什么是Vector        向量(Vector)是一个封装了动态大小数组的顺序容器(Sequence Container).跟任意其它类型容器一样,它能够存放各种类型的对象.可以简单的认为, ...

  7. 动力节点——day08

    什么是集合,有什么用? 数组其实就是一个集合,集合实际上就是一个容器,可以用来容纳其他数据类型 集合为什么说在开发中使用最多? 集合是一个容器,是一个载体,可以一次容纳多个对象,在实际开发中,假设连接 ...

  8. Lamdba表达式的无参数无返回值的练习-Lambda表达式有参数有返回值的练习

    Lamdba表达式的无参数无返回值的练习 题目给定一个厨子Cook接口,内含唯一的抽象方法makeFood,且无参数.无返回值.如下∶public interface cook {void makeF ...

  9. VSCode一键接入Notebook体验算法套件快速完成水表读数

    摘要:本示例围绕真实AI需求场景,介绍VSCode一键接入Notebook体验算法套件快速完成水表读数的使用流程. 本文分享自华为云社区<VSCode一键接入Notebook体验算法套件快速完成 ...

  10. Pycharm中图标的含义

    Pycharm中图标的含义 问题 有同学问,下面的v,c,f等都是啥意思 这个问题嘛,应该在python学习阶段来问,不过我也只能解释部分,有些也只能靠猜测 按图索骥找了下pycharm的官网doc, ...