# NOT RUN {
mydata <- readAntares(areas = "all", links = "all", timeStep = "daily",
select = "nostat")
# Place areas on a map. Ths has to be done once for a given study. Then the
# object returned by "mapLayout" may be saved and reloaded with
# functions save and load
layout <- readLayout()
ml <- mapLayout(layout = layout)
save("ml", file = "ml.rda")
plotMap(x = mydata, mapLayout = ml)
# Specify the variables to use to control the color or size of elements.
plotMap(mydata, mapLayout = ml,
sizeAreaVars = c("WIND", "SOLAR", "H. ROR"),
sizeLinkVar = "FLOW LIN.")
# Change default graphical properties
plotMap(x = mydata, mapLayout = ml, options = list(colArea="red", colLink = "orange"))
plotMap(x = list(mydata, mydata), mapLayout = ml)
# Use custom alias
setAlias("custom_alias", "short description", c("OIL", "GAS", "COAL"))
plotMap(x = mydata, mapLayout = ml, typeSizeAreaVars = TRUE,
aliasSizeAreaVars = "custom_alias")
plotMap(x = mydata, mapLayout = ml, interactive = FALSE,
language = "fr", aliasSizeAreaVars = "Renouvelable", typeSizeAreaVars = TRUE)
# Use h5 for dynamic request / exploration in a study
# Set path of simulaiton
setSimulationPath(path = path1)
# Convert your study in h5 format
writeAntaresH5(path = myNewPath)
# Redefine sim path with h5 file
opts <- setSimulationPath(path = myNewPath)
plotMap(x = opts, mapLayout = ml)
# Compare elements in a single study
plotMap(x = opts, mapLayout = ml, .compare = "mcYear")
# Compare 2 studies
plotMap(x = list(opts, opts2), mapLayout = ml)
# Compare 2 studies with argument refStudies
plotMap(x = opts, refStudy = opts2, mapLayout = ml)
plotMap(x = opts, refStudy = opts2, mapLayout = ml, interactive = FALSE, mcYearh5 = 2)
plotMap(x = opts, refStudy = opts2, mapLayout = ml, h5requestFiltering =
list(mcYears = myMcYear))
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab