rescale_measures | R Documentation |
Given a aggregate id (e.g. reachcode) measure and the from and to measure for a id (e.g. comid flowline), returns the measure along the id line. This is a utility specific to the NHDPlus data model where many comid flowlines make up a single reachcode / reach. "Measures" are typically referenced to reaches. Flowlines have a stated from-measure / to-measure. In some cases it is useful to rescale the measure such that it is relative only to the flowline.
from is downstream – 0 is the outlet to is upstream – 100 is the inlet
rescale_measures(measure, from, to)
measure |
numeric aggregate measure between 0 and 100 |
from |
numeric from-measure relative to the aggregate |
to |
numeric to-measure relative to the aggregate |
numeric rescaled measure
rescale_measures(40, 0, 50)
rescale_measures(60, 50, 100)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.