Comments (9)
from prioritizr.
The pre_prioritizr app looks great!
Yeah that sounds good. If I understand correctly, the pre_prioritizr app assumes users have the marxan data already compiled in a shapefile. We could definitely accommodate input like this with no problem.
We could have an R function that creates a marxan problem like this:
p <-marxan_problem(pu_polygons, cost=..., features=..., locked_in=...,
locked_out=..., penalty=..., edge_factor=....)
where the dots are column names or vectors of values. This returns a standard ConservationProblem
object that would be the same as if the users did:
p <- problem(pu_polygons, features=c(......)) %>%
add_minimum_set_objective(cost='cost') %>%
add_locked_in('locked_in') %>%
add_locked_out('locked_out') %>%
add_boundary_constraint(penalty=.., edge_factor=...)
We could create a load_planning_data
(idea for better name?) function that opens a shiny app that is essentially a wrapper for the marxan_problem
function to help users import data.
After ingesting the data and setting some initial parameters, they could run the modify
function that is the standard shiny interface for visualising solutions and playing around with settings.
p2 <- modify(p)
How does that sound?
My concern is how we should handle raw marxan input data. In this case, the data doesn't have a spatial component and so doing modify(p)
to play around with different parameters and visualise the solution won't work. For this case, should we have it just output the solution as a logical (binary) vector?
Also, I wonder if the shiny apps should go in their own separate R package (eg. prioritizrshiny?), and the R interface should have a different package name (eg. prioritizrcli?), and the real "prioritizr" package would just be a package that imports the two packages (like tidyverse does for dplyr, plyr and etc)?
from prioritizr.
from prioritizr.
Ok, sounds good.
Ok, I'll create a new repo called "prioritizrutils" and put the code there (now that I think about it, cli sounds wrong because its still within R).
from prioritizr.
I've been thinking more about how the different packages should be managed.
I still think it's good having the main R interface in a separate package from the shiny and data packages. But I realised that if we have the "prioritizrutils" in a separate package from the main "prioritizr" package this would mean that all the "useful" help files and package vignettes would be located in a different package. I worry that this might make it harder for users to navigate the help files. What do you think?
from prioritizr.
from prioritizr.
I've just pushed the bulk of priorititzrutils here and everything seems to work. I'll delete prioritizrutils now that it's not needed?
from prioritizr.
from prioritizr.
The package has had the marxan_problem
function to accept Marxan input data for a while now, so I'm closing this issue.
from prioritizr.
Related Issues (20)
- New presolve check warning: more features are needed on previously feasible problem HOT 3
- Error solving problem HOT 6
- please change check in `add_manual_locked_constraints()` HOT 10
- Assertion on 'log_to_console' failed: Must be of type 'logical', not 'integer'. HOT 3
- rij_matrix can return empty matrix when memory = TRUE HOT 2
- installation of cplexAPI package + re-scaling features data HOT 17
- Overly zealous assert causes spurious failure on problem(), breaking valid prioritizr 7.1.1 scripts HOT 2
- high boundary penalties, but solution has weird hole HOT 1
- Error while solving the problem HOT 10
- package overview manual entry
- Add linear constraints for multiple zones HOT 3
- lexicographic (hierachical) multi-objective optimization HOT 5
- Add max area threshold for zone and dealing with fragmented zones HOT 25
- Improve presolve checks HOT 1
- ℹ In argument to `x`. Caused by `problems(pu, features = multi_layer)` HOT 7
- write_problem() doesn't work
- Categorical `SpatRaster` layers break problem creation HOT 4
- Ph.D. HOT 2
- How should I incorporate a risk layer? Penalty, feature, feature weight? HOT 7
- Add proximity-based metrics for irreplaceability
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prioritizr.