Skip to content

Commit

Permalink
Merge pull request #47 from robinhasse/rmZeroWeights
Browse files Browse the repository at this point in the history
Use new mrremind to avoid zeros from IEA_ETP
  • Loading branch information
robinhasse authored Nov 22, 2024
2 parents 45f92e7 + f3aa313 commit a982221
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .buildlibrary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ValidationKey: '1523420'
ValidationKey: '1543619'
AutocreateReadme: yes
AcceptedWarnings:
- 'Warning: package ''.*'' was built under R version'
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ cff-version: 1.2.0
message: If you use this software, please cite it using the metadata from this file.
type: software
title: 'mredgebuildings: Prepare data to be used by the EDGE-Buildings model'
version: 0.7.6
date-released: '2024-11-18'
version: 0.7.7
date-released: '2024-11-20'
abstract: Prepare data to be used by the EDGE-Buildings model.
authors:
- family-names: Hasse
Expand Down
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Type: Package
Package: mredgebuildings
Title: Prepare data to be used by the EDGE-Buildings model
Version: 0.7.6
Date: 2024-11-18
Version: 0.7.7
Date: 2024-11-20
Authors@R: c(
person("Robin", "Hasse", , "robin.hasse@pik-potsdam.de", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-1818-3186")),
Expand All @@ -18,7 +18,7 @@ Depends:
magclass (>= 6.11.0),
mrdrivers (>= 1.0.0),
mrcommons (>= 1.35.0),
mrremind (>= 0.175.4)
mrremind (>= 0.199.1)
Imports:
brick (>= 0.5.0),
dplyr,
Expand Down
6 changes: 3 additions & 3 deletions R/calcShares.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ calcShares <- function(subtype = c("carrier_nonthermal",

# READ-IN DATA ---------------------------------------------------------------

#--- Main Datasets
## Main Datasets ====

# Shares

Expand Down Expand Up @@ -177,6 +177,7 @@ calcShares <- function(subtype = c("carrier_nonthermal",
}



# PROCESS DATA ---------------------------------------------------------------

# Adjust ETP Mapping
Expand Down Expand Up @@ -237,8 +238,7 @@ calcShares <- function(subtype = c("carrier_nonthermal",
if (feOnly) {
data <- feETPfull
} else {
regFE <- feETPfull %>%
mutate(value = replace_na(.data[["value"]], 0))
regFE <- feETPfull
}
}

Expand Down
2 changes: 2 additions & 0 deletions R/readDaioglou.R
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ readDaioglou <- function(subtype = "households.specific floor space") {
mutate(population = asNum(.data[["population"]]),
`population density` = asNum(.data[["population density"]]),
`household expenditure` = asNum(.data[["household expenditure"]]),
# TODO: Hack to remove non-UTF-8 character. Should solve this properly. #nolint
source = iconv(.data[["source"]], "UTF-8", "UTF-8", sub = ""),
source = gsub("\\.", "", .data[["source"]]))
}
data <- data %>%
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Prepare data to be used by the EDGE-Buildings model

R package **mredgebuildings**, version **0.7.6**
R package **mredgebuildings**, version **0.7.7**

[![CRAN status](https://www.r-pkg.org/badges/version/mredgebuildings)](https://cran.r-project.org/package=mredgebuildings) [![R build status](https://github.com/pik-piam/mredgebuildings/workflows/check/badge.svg)](https://github.com/pik-piam/mredgebuildings/actions) [![codecov](https://codecov.io/gh/pik-piam/mredgebuildings/branch/master/graph/badge.svg)](https://app.codecov.io/gh/pik-piam/mredgebuildings) [![r-universe](https://pik-piam.r-universe.dev/badges/mredgebuildings)](https://pik-piam.r-universe.dev/builds)

Expand Down Expand Up @@ -38,7 +38,7 @@ In case of questions / problems please contact Robin Hasse <robin.hasse@pik-pots

To cite package **mredgebuildings** in publications use:

Hasse R, Führlich P, Levesque A, Tockhorn H (2024). _mredgebuildings: Prepare data to be used by the EDGE-Buildings model_. R package version 0.7.6, <https://github.com/pik-piam/mredgebuildings>.
Hasse R, Führlich P, Levesque A, Tockhorn H (2024). _mredgebuildings: Prepare data to be used by the EDGE-Buildings model_. R package version 0.7.7, <https://github.com/pik-piam/mredgebuildings>.

A BibTeX entry for LaTeX users is

Expand All @@ -47,7 +47,7 @@ A BibTeX entry for LaTeX users is
title = {mredgebuildings: Prepare data to be used by the EDGE-Buildings model},
author = {Robin Hasse and Pascal Führlich and Antoine Levesque and Hagen Tockhorn},
year = {2024},
note = {R package version 0.7.6},
note = {R package version 0.7.7},
url = {https://github.com/pik-piam/mredgebuildings},
}
```

0 comments on commit a982221

Please sign in to comment.