Skip to content

Track the spatiotemporal evolution of extreme climate events

License

Notifications You must be signed in to change notification settings

CUG-hydro/SpatioTemporalCluster

Repository files navigation

SpatioTemporal.cluster

AppVeyor build status Travis build status Codecov test coverage

The goal of SMI is to 对时空关联的干旱进行特征分析

Installation

安装Julia

  • Install Julia (>=1.5.3)
  • Install StatsBase, RCall package
  • In Julia, build RCall, ensure using RCall works

安装SpatioTemporal.cluster

devtools::install_github("kongdd/SpatioTemporalCluster")

Example

推荐使用julia版本的cluster_SpatioTemporal,且设置method = "tree",此版本下速度最快

library(SpatioTemporalCluster)
clusterIds <- cluster_SpatioTemporal_julia(arr, method = "tree",
    ncell_connected = 1L, ncell_overlap = 5L, factor = 1e4, diag = FALSE) 

covr::package_coverage()

covr::package_coverage()
SpatioTemporalCluster Coverage: 12.06%
R/cluster_stats.R: 0.00%
R/HW_indices.R: 0.00%
R/plot.R: 0.00%
src/init.c: 0.00%
src/InputOutput.f90: 0.00%
src/mo_drought_evaluation.f90: 0.00%
src/mo_global_variables.f90: 0.00%
src/mo_julian.f90: 0.00%
src/mo_kind.f90: 0.00%
src/mo_percentile.f90: 0.00%
src/mo_sort.f90: 0.00%
src/mo_utils.f90: 0.00%
src/mo_weight.f90: 0.00%
src/sub_ClusterStats2.f90: 0.00%
R/connect_temporal_Rjulia.R: 40.00%
R/cluster_SpatioTemporal_Fortran.R: 40.82%
R/tools.R: 46.34%
R/cluster_SpatioTemporal_Rjulia.R: 75.56%
R/connect_temporal_Rfortran.R: 76.47%
R/clusterID_recode.R: 92.86%
R/connect_spatial.R: 95.24%

References