man/hello.Rd 0 → 100644
\name{hello}
\alias{hello}
\title{Hello, World!}
\usage{
hello()
}
\description{
Prints 'Hello, world!'.
}
\examples{
hello()
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/capri_gdx_util.r
\name{load_dataout}
\alias{load_dataout}
\title{CAPRI gdx utilities}
\usage{
load_dataout(filename)
}
\arguments{
\item{filename}{Name of the .gdx file to be loaded}
}
\description{
simply loads the data cube from a CAPMOD result file
}
\examples{
load_dataout("test.gdx")
}
man/pchange.Rd 0 → 100644
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/capri_gdx_util.r
\name{pchange}
\alias{pchange}
\title{function to calculate percentage changes}
\usage{
pchange(a, b)
}
\arguments{
\item{a}{Base number of the percentage change calculation}
\item{b}{Target number of the percentage change calculation}
}
\description{
function to calculate percentage changes
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/capri_maps.r
\name{prep_mapdata}
\alias{prep_mapdata}
\title{Prepares the data to be mapped directly}
\usage{
prep_mapdata()
}
\value{
A tibble with the merged data
}
\description{
Combines .kml data and NUTS2 regional mappings
}
\examples{
x <- prep_mapdata() \%>\% left_join(co2em, by = c("CAPRI_NUTS_ID" = "region"))
# remove Portuguese islands and Canarias to remove empty spaces on EU maps...
x <- x \%>\% filter(!grepl("PT20", CAPRI_NUTS_ID)) \%>\% filter(!grepl("PT30", CAPRI_NUTS_ID)) \%>\% filter(!grepl("ES70", CAPRI_NUTS_ID))
# prepare the map with ggplot
p <- x \%>\% filter(!grepl("TR.*", CAPRI_NUTS_ID)) \%>\%
ggplot(aes(longitude, latitude, group = name, fill = pc)) +
geom_polygon(color = "white") +
coord_map("albers", lat0=30, lat1=35) +
scale_fill_gradient(low = "red", high = "white") +
labs(x = "", y = "") + theme(
axis.text.x = element_blank(),
axis.text.y = element_blank(),
axis.ticks = element_blank())
p$labels$fill <- " "
# save map to .png
p
ggsave("mapout/emission_changes.png", width = 16, height = 9)
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/capri_gdx_util.r
\name{write_param_togdx}
\alias{write_param_togdx}
\title{write a parameter into a .gdx file}
\usage{
write_param_togdx(x, file, symname = "default", ts = "default")
}
\arguments{
\item{x}{R object}
\item{file}{Name of the output .gdx}
\item{symname}{Name of the GAMS parameter in the output .gdx file}
\item{ts}{GAMS parameter description}
}
\description{
write a parameter into a .gdx file
}