Skip to content

relative importance for spatial polygons #1

@PhDyellow

Description

@PhDyellow

An extension to 6.6 "solutions portfolios" would be to use eval_replacement_importance() on the Taz data.

p9 <- prob %>%
      add_min_set_objective() %>%
      add_relative_targets(0.2) %>%
      add_locked_in_constraints("locked_in") %>%
      add_locked_out_constraints("locked_out") %>%
      add_binary_decisions() %>%
      add_gurobi_solver(verbose = TRUE)
      # add_lpsymphony_solver(verbose = FALSE)
# solve problem
s9 <- solve(p9)

# plot solution
plot_solution(s9)


s9x <- s9
s9x@data <- s9@data[, "solution_1", drop = FALSE]
ri9 <- eval_replacement_importance(p9, s9x)

spplot(ri9, zcol = "rc")

Notice the section where I have to do some modification to s9 to make it work. This might be a bug in prioritizr.

s9x <- s9
s9x@data <- s9@data[, "solution_1", drop = FALSE]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions