Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SMLSamplingEU
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
A compter du 1er avril, attention à vos pipelines :
Nouvelles limitations de Docker Hub
Show more breadcrumbs
Nicolas Saby
SMLSamplingEU
Commits
f17f2846
Commit
f17f2846
authored
1 year ago
by
Nicolas Saby
Browse files
Options
Downloads
Patches
Plain Diff
tidy things
parent
d410c8c7
No related branches found
No related tags found
No related merge requests found
Pipeline
#170449
failed
1 year ago
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
1- DataPreparationJRC.R
+35
-0
35 additions, 0 deletions
1- DataPreparationJRC.R
2-SMLFilltableJRCTests.R
+0
-0
0 additions, 0 deletions
2-SMLFilltableJRCTests.R
README.md
+2
-1
2 additions, 1 deletion
README.md
with
37 additions
and
1 deletion
1- DataPreparationJRC.R
0 → 100644
+
35
−
0
View file @
f17f2846
library
(
sf
)
library
(
terra
)
library
(
ggplot2
)
library
(
dplyr
)
library
(
tidyr
)
library
(
clhs
)
library
(
viridis
)
library
(
tmap
)
# 1 Data preparation -----
setwd
(
"~/serena/data/sml/europe/"
)
stacka
<-
rast
(
c
(
"FR_OC.tif"
,
"FR_pH.tif"
,
"FR_TXT.tif"
,
"FR_N.tif"
,
"FR_P.tif"
,
"FR_CEC.tif"
,
"FR_BD010.tif"
)
)
stackb
<-
rast
(
c
(
"FR_CLC.tif"
,
"FR_NUTS2.tif"
,
"FR_NUTS1.tif"
))
stack
=
c
(
stacka
,
stackb
)
change
=
FALSE
# set true to resample rasters
if
(
change
)
{
# Change resolution
stac500a
<-
terra
::
aggregate
(
stacka
,
5
,
fun
=
mean
)
stac500b
<-
terra
::
aggregate
(
stackb
,
5
,
fun
=
modal
)
stack500
=
c
(
stac500a
,
stac500b
)
terra
::
writeRaster
(
stack500
,
filename
=
"~/serena/data/sml/europe/stack500.tiff"
,
overwrite
=
TRUE
)
}
else
{
stack500
=
rast
(
"~/serena/data/sml/europe/stack500.tiff"
)
}
This diff is collapsed.
Click to expand it.
1
-SMLFilltableJRCTests.R
→
2
-SMLFilltableJRCTests.R
+
0
−
0
View file @
f17f2846
File moved
This diff is collapsed.
Click to expand it.
README.md
+
2
−
1
View file @
f17f2846
...
...
@@ -4,7 +4,8 @@ this project to share the statistical work on sampling exercise
# code
use smltest.R to run the optimisation algorithm
use 2-SMLFilltableJRCTests.R to run different tests required.
use 1-DataPreparationJRC.R to prepare the rasters from JRC sharepoint
# Questions
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment