recoverDataFromDatePoints: recoverDataFromDatePoints

Description Usage Arguments Details Examples

Description

The function recovers data from a plot given the calibration points and data points.

Usage

1
2
3
recoverDataFromDatePoints(calibrationPoints, dataPoints, beginDate, endDate,
  ymin, ymax, dateFormat = "%m/%d/%Y", roundValue = 2,
  xValueName = "date", yValueName = "yValues")

Arguments

calibrationPoints

a list of calibration points as a list of x coordinates and another list with y coordinates. The points are in the order of ymax, ymin, xmax, xmin

dataPoints

a list of data points as a list of x coordinates and another list with y coordinates.

beginDate

The beginning of a time coordinate on the x axis

endDate

The end of a time coordinate on the x axis

ymin

The minimum on the y axis of an extraction plot

ymax

The maximum on the y axis of an extraction plot

dateFormat

The formatting for the date (same as the as.Date)

roundValue

The number of decimal points to round data.

xValueName

The name assigned to the x value in the output dataset

yValueName

The name assigned to the y value in the output dataset

Details

It is assumed the figure is rotated such that the x and y axis are in the cardinal directions. A distorted or rotated image should be processed with image editing software before a recovery is attempted.

The extractCalibrationPoints() function can aquire the calibration points. The extractDataPoints() function can aquire the data points.

This function is designed to work on a single dataset. If multiple datasets are in the software then this function should be called multiple times.

This function assumes time progresses from left to right on the x axis. This function assumes the value goes from the minimum on the bottom to the maximum on the top.

This function will still work if minimum or maximum values are adjusted to other values so long as the values given match the coorsponding point on the plot.

Examples

1
2
3
4
5
6
prepareExtractionPlot(
   "figure_1_Global_Temperature_Change_Hansen_Et_Al_2006.png"
   )

calibrationPoints <- extractCalibrationPoints()
datapoints <- extractDataPoints(24)

Agriculturist/SimpleDigitizeR documentation built on July 28, 2020, 4:22 a.m.