Project class

Project class

Details

Definition for the Project class.

See also

Public fields

id

character identifier.

site_ids

character vector

site_descriptions

character vector

feature_ids

character vector

feature_html_ids

character vector

feature_descriptions

character vector

action_ids

character vector

action_colors

character vector of colors for each action.

action_descriptions

character vector

site_data

data.frame object.

feature_data

data.frame object.

feasibility_data

data.frame object.

site_geometry

sf::st_sf() object.

parameters

list of parameters.

settings

list of Parameter objects.

consequence_data

list of data.frame objects.

site_cost_headers

character vector with names.

site_status_header

character value.

action_feasibility_headers

character vector with names.

feature_goal_header

character value.

feature_weight_header

character value.

consequence_action_headers

character named vector.

consequence_feature_headers

character named vector.

Methods

Public methods


Method new()

Create a Project object.

Usage

Project$new(
  id,
  site_ids,
  site_descriptions,
  site_geometry,
  feature_ids,
  feature_descriptions,
  action_ids,
  action_descriptions,
  site_data,
  feature_data,
  feasibility_data,
  consequence_data,
  parameters
)

Arguments

id

character value.

site_ids

character vector

site_descriptions

character vector

site_geometry

sf::st_sf() object.

feature_ids

character vector

feature_descriptions

character vector

action_ids

character vector

action_descriptions

character vector

site_data

data.frame object.

feature_data

data.frame object.

feasibility_data

data.frame object.

consequence_data

list of data.frame objects.

parameters

list of parameters.

Returns

A new Project object.

Method new()

Create a Project object.

Usage

Project$new(
  id,
  site_ids,
  site_descriptions,
  site_geometry,
  feature_ids,
  feature_descriptions,
  action_ids,
  action_descriptions,
  site_data,
  feature_data,
  feasibility_data,
  consequence_data,
  parameters
)

Arguments

id

character value.

site_ids

character vector

site_descriptions

character vector

site_geometry

sf::st_sf() object.

feature_ids

character vector

feature_descriptions

character vector

action_ids

character vector

action_descriptions

character vector

site_data

data.frame object.

feature_data

data.frame object.

feasibility_data

data.frame object.

consequence_data

list of data.frame objects.

parameters

list of parameters.

Returns

A new Project object.


Method print()

Print the object.

Usage

Project$print(...)

Arguments

...

not used.

Method print()

Print the object.

Usage

Project$print(...)

Arguments

...

not used.


Method repr()

Generate a character summarizing the representation of the object.

Usage

Project$repr()

Returns

character value.

Method repr()

Generate a character summarizing the representation of the object.

Usage

Project$repr()

Returns

character value.


Method get_site_ids()

Get site identifiers.

Usage

Project$get_site_ids()

Returns

character vector.

Method get_site_ids()

Get site identifiers.

Usage

Project$get_site_ids()

Returns

character vector.


Method get_feature_ids()

Get feature identifiers.

Usage

Project$get_feature_ids()

Returns

character vector.

Method get_feature_ids()

Get feature identifiers.

Usage

Project$get_feature_ids()

Returns

character vector.


Method get_feature_ids_from_html_id()

Get feature HTML identifiers.

Usage

Project$get_feature_ids_from_html_id(feature_html_id)

Arguments

feature_html_id

character vector of feature identifiers.

Returns

character vector.

Method get_feature_ids_from_html_id()

Get feature HTML identifiers.

Usage

Project$get_feature_ids_from_html_id(feature_html_id)

Arguments

feature_html_id

character vector of feature identifiers.

Returns

character vector.


Method get_action_ids()

Get action identifiers.

Usage

Project$get_action_ids()

Returns

character vector.

Method get_action_ids()

Get action identifiers.

Usage

Project$get_action_ids()

Returns

character vector.


Method get_feature_goal()

Get feature goal.

Usage

Project$get_feature_goal(feature_id)

Arguments

feature_id

character identifier for feature

Returns

numeric value.

Method get_feature_goal()

Get feature goal.

Usage

Project$get_feature_goal(feature_id)

Arguments

feature_id

character identifier for feature

Returns

numeric value.


Method get_feature_weight()

Get feature weight.

Usage

Project$get_feature_weight(feature_id)

Arguments

feature_id

character identifier for feature

Returns

numeric value.

Method get_feature_weight()

Get feature weight.

Usage

Project$get_feature_weight(feature_id)

Arguments

feature_id

character identifier for feature

Returns

numeric value.


Method get_site_statuses()

Get colors for actions.

Usage

Project$get_site_statuses()

Arguments

action_id

character identifier for action.

Returns

character vector.

Method get_site_statuses()

Get colors for actions.

Usage

Project$get_site_statuses()

Arguments

action_id

character identifier for action.

Returns

character vector.


Method get_action_costs()

Get cost data for implementing an action within each site.

Usage

Project$get_action_costs(action_id)

Arguments

action_id

character identifier for action.

Returns

numeric vector.

Method get_action_costs()

Get cost data for implementing an action within each site.

Usage

Project$get_action_costs(action_id)

Arguments

action_id

character identifier for action.

Returns

numeric vector.


Method get_action_feasibility()

Get feasibility data for implementing an action within each site.

Usage

Project$get_action_feasibility(action_id)

Arguments

action_id

character identifier for action.

Returns

logical vector.

Method get_action_feasibility()

Get feasibility data for implementing an action within each site.

Usage

Project$get_action_feasibility(action_id)

Arguments

action_id

character identifier for action.

Returns

logical vector.


Method get_consequences_for_feature()

Get consequence data for features.

Usage

Project$get_consequences_for_feature(action_id, feature_id)

Arguments

action_id

character identifier for action.

feature_id

character identifier for feature.

Returns

numeric vector.

Method get_consequences_for_feature()

Get consequence data for features.

Usage

Project$get_consequences_for_feature(action_id, feature_id)

Arguments

action_id

character identifier for action.

feature_id

character identifier for feature.

Returns

numeric vector.


Method get_min_budget()

Get the cost of the cheapest solution.

Usage

Project$get_min_budget()

Returns

numeric value.

Method get_min_budget()

Get the cost of the cheapest solution.

Usage

Project$get_min_budget()

Returns

numeric value.


Method get_max_budget()

Get the cost of the most expensive solution.

Usage

Project$get_max_budget()

Returns

numeric value.

Method get_max_budget()

Get the cost of the most expensive solution.

Usage

Project$get_max_budget()

Returns

numeric value.


Method get_max_feature_consequence()

Get the highest amount for each feature.

Usage

Project$get_max_feature_consequence()

Returns

data.frame containing a feature_id and amount columns.

Method get_max_feature_consequence()

Get the highest amount for each feature.

Usage

Project$get_max_feature_consequence()

Returns

data.frame containing a feature_id and amount columns.


Method get_current_feature_consequence()

Get the current expected amount for each feature.

Usage

Project$get_current_feature_consequence()

Returns

data.frame containing a feature_id and amount columns.

Method get_current_feature_consequence()

Get the current expected amount for each feature.

Usage

Project$get_current_feature_consequence()

Returns

data.frame containing a feature_id and amount columns.


Method get_map_layers()

Get layer names for rendering data on map.

Usage

Project$get_map_layers()

Returns

character vector of layer names.

Method get_map_layers()

Get layer names for rendering data on map.

Usage

Project$get_map_layers()

Returns

character vector of layer names.


Method get_pu_data()

Get planning unit data for optimization.

Usage

Project$get_pu_data()

Returns

data.frame object.

Method get_pu_data()

Get planning unit data for optimization.

Usage

Project$get_pu_data()

Returns

data.frame object.


Method get_current_status_data()

Get status data for optimization.

Usage

Project$get_current_status_data()

Returns

data.frame object.

Method get_current_status_data()

Get status data for optimization.

Usage

Project$get_current_status_data()

Returns

data.frame object.


Method get_zone_data()

Get zone data for optimization.

Usage

Project$get_zone_data()

Returns

data.frame object.

Method get_zone_data()

Get zone data for optimization.

Usage

Project$get_zone_data()

Returns

data.frame object.


Method get_goal_data()

Get goal data for optimization.

Usage

Project$get_goal_data()

Returns

data.frame object.

Method get_goal_data()

Get goal data for optimization.

Usage

Project$get_goal_data()

Returns

data.frame object.


Method get_weight_data()

Get weight data for optimization.

Usage

Project$get_weight_data()

Returns

data.frame object.

Method get_weight_data()

Get weight data for optimization.

Usage

Project$get_weight_data()

Returns

data.frame object.


Method get_locked_data()

Get locked data for optimization.

Usage

Project$get_locked_data()

Returns

data.frame object.

Method get_locked_data()

Get locked data for optimization.

Usage

Project$get_locked_data()

Returns

data.frame object.


Method get_bbox()

Get the bounding box.

Usage

Project$get_bbox(expand = FALSE)

Arguments

expand

FALSE should the bounding box be expanded by 10%?

Returns

list object with "xmin", "xmax", "ymin", and "ymax" elements.

Method get_bbox()

Get the bounding box.

Usage

Project$get_bbox(expand = FALSE)

Arguments

expand

FALSE should the bounding box be expanded by 10%?

Returns

list object with "xmin", "xmax", "ymin", and "ymax" elements.


Method get_solution_settings_data()

Get data for rendering the solution settings widget.

Usage

Project$get_solution_settings_data()

Returns

list object.

Method get_solution_settings_data()

Get data for rendering the solution settings widget.

Usage

Project$get_solution_settings_data()

Returns

list object.


Method get_goals_settings_data()

Get data for rendering widget to specify goals.

Usage

Project$get_goals_settings_data()

Returns

list object.

Method get_goals_settings_data()

Get data for rendering widget to specify goals.

Usage

Project$get_goals_settings_data()

Returns

list object.


Method get_weights_settings_data()

Get data for rendering widget to specify weights.

Usage

Project$get_weights_settings_data()

Returns

list object.

Method get_weights_settings_data()

Get data for rendering widget to specify weights.

Usage

Project$get_weights_settings_data()

Returns

list object.


Method set_feature_goal()

Set goal for a feature.

Usage

Project$set_feature_goal(feature_id, value)

Arguments

feature_id

character value containing the feature identifier.

value

numeric value containing the new goal.

Method set_feature_goal()

Set goal for a feature.

Usage

Project$set_feature_goal(feature_id, value)

Arguments

feature_id

character value containing the feature identifier.

value

numeric value containing the new goal.


Method set_feature_weight()

Set weight for a feature.

Usage

Project$set_feature_weight(feature_id, value)

Arguments

feature_id

character value containing the feature identifier.

value

numeric value containing the new weight.

Method set_feature_weight()

Set weight for a feature.

Usage

Project$set_feature_weight(feature_id, value)

Arguments

feature_id

character value containing the feature identifier.

value

numeric value containing the new weight.


Method set_site_data()

Set site data.

Usage

Project$set_site_data(x)

Arguments

x

data.frame containing new data.

Method set_site_data()

Set site data.

Usage

Project$set_site_data(x)

Arguments

x

data.frame containing new data.


Method set_feature_data()

Set feature data.

Usage

Project$set_feature_data(x)

Arguments

x

data.frame containing new data.

Method set_feature_data()

Set feature data.

Usage

Project$set_feature_data(x)

Arguments

x

data.frame containing new data.


Method set_feasibility_data()

Set feasibility data.

Usage

Project$set_feasibility_data(x)

Arguments

x

data.frame containing new data.

Method set_feasibility_data()

Set feasibility data.

Usage

Project$set_feasibility_data(x)

Arguments

x

data.frame containing new data.


Method set_consequence_data()

Set consequence data.

Usage

Project$set_consequence_data(x, action_id)

Arguments

x

data.frame containing new data.

action_id

character identifier for action.

Method set_consequence_data()

Set consequence data.

Usage

Project$set_consequence_data(x, action_id)

Arguments

x

data.frame containing new data.

action_id

character identifier for action.


Method render_on_map()

Render on map.

Usage

Project$render_on_map(map, data = "location", group = "sites")

Arguments

map

leaflet::leaflet() object.

data

character name of dataset to show. Argument must be a valid layer name (see self$get_map_layers()).

group

character group name. Defaults to "sites".

Returns

leaflet::leaflet() map.

Method render_on_map()

Render on map.

Usage

Project$render_on_map(map, data = "location", group = "sites")

Arguments

map

leaflet::leaflet() object.

data

character name of dataset to show. Argument must be a valid layer name (see self$get_map_layers()).

group

character group name. Defaults to "sites".

Returns

leaflet::leaflet() map.


Method render_site_data()

Render site data.

Usage

Project$render_site_data(height = "100%", width = "100%")

Arguments

height

character/numeric CSS measurement value. Default to "100%".

width

character/numeric CSS measurement value. Default to "100%".

Returns

rhandsontable::rhandsontable object.

Method render_site_data()

Render site data.

Usage

Project$render_site_data(height = "100%", width = "100%")

Arguments

height

character/numeric CSS measurement value. Default to "100%".

width

character/numeric CSS measurement value. Default to "100%".

Returns

rhandsontable::rhandsontable object.


Method render_feature_data()

Render feature data.

Usage

Project$render_feature_data(height = "100%", width = "100%")

Arguments

height

character/numeric CSS measurement value. Default to "100%".

width

character/numeric CSS measurement value. Default to "100%".

Returns

rhandsontable::rhandsontable object.

Method render_feature_data()

Render feature data.

Usage

Project$render_feature_data(height = "100%", width = "100%")

Arguments

height

character/numeric CSS measurement value. Default to "100%".

width

character/numeric CSS measurement value. Default to "100%".

Returns

rhandsontable::rhandsontable object.


Method render_feasibility_data()

Render feasibility data.

Usage

Project$render_feasibility_data(height = "100%", width = "100%")

Arguments

height

character/numeric CSS measurement value. Default to "100%".

width

character/numeric CSS measurement value. Default to "100%".

Returns

rhandsontable::rhandsontable object.

Method render_feasibility_data()

Render feasibility data.

Usage

Project$render_feasibility_data(height = "100%", width = "100%")

Arguments

height

character/numeric CSS measurement value. Default to "100%".

width

character/numeric CSS measurement value. Default to "100%".

Returns

rhandsontable::rhandsontable object.


Method render_consequence_data()

Render consequence data.

Usage

Project$render_consequence_data(action_id, height = "100%", width = "100%")

Arguments

action_id

character identifier for action.

height

character/numeric CSS measurement value. Default to "100%".

width

character/numeric CSS measurement value. Default to "100%".

Returns

rhandsontable::rhandsontable object.

Method render_consequence_data()

Render consequence data.

Usage

Project$render_consequence_data(action_id, height = "100%", width = "100%")

Arguments

action_id

character identifier for action.

height

character/numeric CSS measurement value. Default to "100%".

width

character/numeric CSS measurement value. Default to "100%".

Returns

rhandsontable::rhandsontable object.


Method write()

Write the data to disk.

Usage

Project$write(workbook_path, geometry_path)

Arguments

workbook_path

character file path.

geometry_path

character file path.

Method write()

Write the data to disk.

Usage

Project$write(workbook_path, geometry_path)

Arguments

workbook_path

character file path.

geometry_path

character file path.


Method clone()

The objects of this class are cloneable with this method.

Usage

Project$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Method clone()

The objects of this class are cloneable with this method.

Usage

Project$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.