Skip to content
/ rgee2 Public

Extension for rgee

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

rpkgs/rgee2

Repository files navigation

rgee2

R-CMD-check codecov

  • conda install earthengine-api=0.1.370
  • rgee: 0.1.7

Installation

You can install the development version of rgee2 from GitHub with:

# install.packages("remotes")
remotes::install_github("rpkgs/rgee2")

网络设置详见:网络设置.md

Example

This is a basic example which shows you how to solve a common problem:

library(rgee2)
library(rgee)
ee_Initialize(drive = TRUE)
#> -- rgee 1.1.2 --------------------------------------- earthengine-api 0.1.280 -- 
#>  v user: not_defined
#>  v Google Drive credentials: v Google Drive credentials:  FOUND
#>  v Initializing Google Earth Engine: v Initializing Google Earth Engine:  DONE!
#>  v Earth Engine account: users/kongdd 
#> --------------------------------------------------------------------------------

Illustration by EAR5L data

# bands = c('T', "Tdew", 'Pa', 'Rn', 'ET', 'U2')
year = 2020
month = 1
col <- ee$ImageCollection("ECMWF/ERA5_LAND/HOURLY")$
    filter(ee$filter$Filter$calendarRange(year, year, "year"))$
    filter(ee$filter$Filter$calendarRange(month, month, "month"))$
    select(0:4)
# print(col)

img = col$first()
print(img)
#> bandNames: 
#> dewpoint_temperature_2m, temperature_2m, skin_temperature, soil_temperature_level_1, soil_temperature_level_2
#> Properties: 
#> List of 6
#>  $ system:time_start: int -1
#>  $ hour             : int 0
#>  $ system:footprint :List of 2
#>   ..$ type       : chr "LinearRing"
#>   ..$ coordinates:List of 5
#>   .. ..$ : int [1:2] -180 -90
#>   .. ..$ : int [1:2] 180 -90
#>   .. ..$ : int [1:2] 180 90
#>   .. ..$ : int [1:2] -180 90
#>   .. ..$ : int [1:2] -180 -90
#>  $ system:time_end  : int -1
#>  $ system:asset_size: int 400727784
#>  $ system:index     : chr "20200101T00"
ee_timestart(col) %>% head()
ee_timeend(col) %>% head()

ee_bandNames(col)
ee_bandNames(img)

ee_properties(col)
ee_aggregate_array(col, prop = "system:index")

About

Extension for rgee

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Packages

No packages published