-
Notifications
You must be signed in to change notification settings - Fork 5
/
spine_preprocess.Rd
35 lines (33 loc) · 1.36 KB
/
spine_preprocess.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spine_chart_utils.R
\name{spine_preprocess}
\alias{spine_preprocess}
\title{Preprocess data for spine chart}
\usage{
spine_preprocess(data, indicator, timeperiod_sortable)
}
\arguments{
\item{data}{a data frame to create the spine chart from. the data frame
should contain data for all area types included in the chart (eg, if
plotting for County & UA with a comparator of region and a median line for
national, the data frame should contain all of these data)}
\item{indicator}{unquoted field name for indicators. This should be what is
presented as the label for the final spine chart, hence should be unique
for each vertabra. Be careful the indicator doesn't have sub-categories
based on other fields, such as sex (male, female, persons) or age group}
\item{timeperiod_sortable}{unquoted field name containing the time period
that is numeric and sortable, such that higher values are a later time
period}
}
\value{
A processed data frame for latest time periods of given indicators
}
\description{
Returns a data frame with the latest time period of data for each indicator
name.
}
\details{
This processing only takes place on the indicator field and the time
period field provided. If the data contains multiple sexes or age groups
for an indicator, make sure the indicator field reflects this.
}