Skip to content

Commit

Permalink
Merge pull request #16 from robinhasse/main
Browse files Browse the repository at this point in the history
Matching references
  • Loading branch information
robinhasse authored Jun 29, 2023
2 parents 34e3589 + 4da9a32 commit 48d4f2e
Show file tree
Hide file tree
Showing 16 changed files with 457 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .buildlibrary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ValidationKey: '429330'
ValidationKey: '586110'
AutocreateReadme: yes
AcceptedWarnings:
- 'Warning: package ''.*'' was built under R version'
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repos:
- id: mixed-line-ending

- repo: https://github.com/lorenzwalthert/precommit
rev: v0.3.2.9007
rev: v0.3.2.9013
hooks:
- id: parsable-R
- id: deps-in-desc
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.2.2
date-released: '2023-06-07'
version: 0.3.0
date-released: '2023-06-29'
abstract: Prepare data to be used by the EDGE-Buildings model.
authors:
- family-names: Hasse
Expand Down
4 changes: 2 additions & 2 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.2.2
Date: 2023-06-07
Version: 0.3.0
Date: 2023-06-29
Authors@R: c(
person("Robin", "Hasse", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-1818-3186")),
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ HELP_PARSING = 'm <- readLines("Makefile");\
help: ## Show this help.
@Rscript -e $(HELP_PARSING)

build: ## Build the package using lucode2::buildLibrary().
Rscript -e 'lucode2::buildLibrary()'
build: ## Build the package using lucode2::buildLibrary(). You can pass the
## updateType with 'make build u=3'
Rscript -e 'lucode2::buildLibrary(updateType = "$(u)")'

check: ## Build documentation and vignettes, run testthat tests,
## and check if code etiquette is followed using lucode2::check().
Expand Down
5 changes: 5 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export(calcFloorspacePast)
export(calcHDDCDD)
export(calcHouseholdSize)
export(calcIEAPFU)
export(calcMatchingReference)
export(calcRenovationAlternatives)
export(calcShareETP)
export(calcShareOdyssee)
Expand All @@ -14,6 +15,7 @@ export(convertCensusHub)
export(convertDaioglou)
export(convertEEAfloorspace)
export(convertEUBuildingsDB)
export(convertEnergiforsk2016)
export(convertEurObservER)
export(convertEuropeanCommissionRenovation)
export(convertEurostatBuildings)
Expand All @@ -28,6 +30,7 @@ export(readDaioglou)
export(readEEAfloorspace)
export(readEHI)
export(readEUBuildingsDB)
export(readEnergiforsk2016)
export(readEurObservER)
export(readEuropeanCommissionRenovation)
export(readEurostatBuildings)
Expand All @@ -43,6 +46,7 @@ import(magclass)
import(mrcommons)
import(mrdrivers)
importFrom(dplyr,"%>%")
importFrom(dplyr,.data)
importFrom(dplyr,across)
importFrom(dplyr,all_of)
importFrom(dplyr,anti_join)
Expand Down Expand Up @@ -111,6 +115,7 @@ importFrom(stats,predict)
importFrom(stats,pweibull)
importFrom(tidyr,complete)
importFrom(tidyr,gather)
importFrom(tidyr,pivot_longer)
importFrom(tidyr,replace_na)
importFrom(tidyr,separate)
importFrom(tidyr,spread)
Expand Down
3 changes: 2 additions & 1 deletion R/calcBuildingStock.R
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,8 @@ calcBuildingStock <- function(subtype = c("residential", "commercial")) {
group_by(across(all_of(c("region", "period")))) %>%
mutate(value = proportions(.data[["value"]]))
stock <- stock %>%
left_join(heatingShares, by = c("region", "period")) %>%
left_join(heatingShares, by = c("region", "period"),
relationship = "many-to-many") %>%
mutate(value = .data[["value.x"]] * .data[["value.y"]]) %>%
select(-"value.x", -"value.y") %>%
rename(heating = "carrier")
Expand Down
Loading

0 comments on commit 48d4f2e

Please sign in to comment.