% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wrangle_data.R
\name{wrangle_gho_data}
\alias{wrangle_gho_data}
\title{Put GHO data into billionaiRe format}
\usage{
wrangle_gho_data(df, source = NULL, type = NULL, ind = NULL, scenario = NULL)
}
\arguments{
\item{df}{A data frame in GHO format, returned from [ghost:gho_data()]{https://gpw13.github.io/ghost/reference/gho_data.html}.}

\item{source}{Character string of source to be provided to the data frame if
the source is not already available in the GHO. If \code{NULL}, the source
column is generated from the GHO's \code{DataSourceDim} column.}

\item{type}{Character string of type to be provided to the data frame. If
\code{NULL}, the type column is just filled with \code{NA_character_}.}

\item{ind}{Character string of the indicator to be provided to the data frame. If
\code{NULL}, the indicator is determined by applying the \code{convert_ind_codes} function
on the \code{IndicatorCode} field of the GHO data.}

\item{scenario}{(Character) string of scenario to be provided to the data frame.
If \code{NULL}, the scenario is set to \code{NA_character}.}
}
\value{
A data frame.
}
\description{
\code{wrangle_gho_data} takes data returned from the GHO OData API, which should
be obtained using  [ghost:gho_data()]{https://gpw13.github.io/ghost/reference/gho_data.html}, and transforms it into data that is
ready to be put into the xMart database and used within the billionaiRe
package. Currently, providing source and type inputs these values into the
entire data frame, so does not work if multiple indicators have been loaded
into the GHO data frame.
}
\seealso{
Wrangle data functions
\code{\link{add_missing_xmart_rows}()},
\code{\link{get_data_lake_name}()},
\code{\link{get_whdh_path}()},
\code{\link{has_xmart_cols}()},
\code{\link{save_gho_backup_to_whdh}()},
\code{\link{save_wrangled_output}()},
\code{\link{wrangle_gho_rural_urban_data}()},
\code{\link{wrangle_unsd_data}()},
\code{\link{xmart_col_types}()},
\code{\link{xmart_cols}()}
}
\concept{whdh}
