Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/DavidhoPIK/mrcommons
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidhoPIK committed May 17, 2024
2 parents 1df9e4a + 8a18b8a commit b75b733
Show file tree
Hide file tree
Showing 179 changed files with 116 additions and 13,695 deletions.
2 changes: 1 addition & 1 deletion .buildlibrary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ValidationKey: '27780630'
ValidationKey: '27996960'
AcceptedWarnings:
- 'Warning: package ''.*'' was built under R version'
- 'Warning: namespace ''.*'' is not available and has been replaced'
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

Expand All @@ -23,7 +23,6 @@ jobs:
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
gamstransfer=?ignore
any::lucode2
any::covr
any::madrat
Expand All @@ -36,7 +35,7 @@ jobs:
# gms, goxygen, GDPuc) will usually have an outdated binary version
# available; by using extra-packages we get the newest version

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9

Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exclude: '^tests/testthat/_snaps/.*$'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: 2c9f875913ee60ca25ce70243dc24d5b6415598c # frozen: v4.6.0
hooks:
- id: check-case-conflict
- id: check-json
Expand All @@ -15,7 +15,7 @@ repos:
- id: mixed-line-ending

- repo: https://github.com/lorenzwalthert/precommit
rev: v0.4.0
rev: 7910e0323d7213f34275a7a562b9ef0fde8ce1b9 # frozen: v0.4.2
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: 'mrcommons: MadRat commons Input Data Library'
version: 1.40.2
date-released: '2024-04-02'
version: 1.41.0
date-released: '2024-05-13'
abstract: Provides useful functions and a common structure to all the input data required
to run models like MAgPIE and REMIND of model input data.
authors:
Expand Down
12 changes: 5 additions & 7 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: mrcommons
Type: Package
Title: MadRat commons Input Data Library
Version: 1.40.2
Date: 2024-04-02
Version: 1.41.0
Date: 2024-05-13
Authors@R: c(person("Benjamin Leon", "Bodirsky", email = "[email protected]", role = "aut"),
person("Kristine", "Karstens", role = "aut"),
person("Lavinia", "Baumstark", role = "aut"),
Expand Down Expand Up @@ -43,18 +43,17 @@ Depends:
magclass (>= 3.17),
madrat (>= 2.20.9),
mrdrivers (>= 1.0.0),
mstools
mrfaocore (>= 1.0.0),
mrlandcore (>= 1.0.0),
mstools (>= 0.6.0)
Imports:
data.table,
dplyr,
hdf5r,
GDPuc,
lpjclass,
lpjmlkit,
luscale,
magpiesets (>= 0.44.2),
ncdf4,
nleqslv,
openxlsx,
purrr,
quitte,
Expand All @@ -63,7 +62,6 @@ Imports:
readxl,
reshape2,
rlang,
SPEI,
stringr,
tidyr,
tibble,
Expand Down
54 changes: 2 additions & 52 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export(calcBodyHeight)
export(calcClimateClass)
export(calcConstructionWoodDemand)
export(calcDemography)
export(calcForestArea)
export(calcGovernanceIndicator)
export(calcGrowingStock)
export(calcGrowingStockNRF)
Expand All @@ -23,38 +22,19 @@ export(convertJRC_IDEES)
export(convertMAgPIE)
export(readEU_ReferenceScenario)
export(readEurostat)
export(readFAO_FRA2015)
export(readFRA2020)
export(readFeedEfficiencyReg)
export(readFeedShareReg)
export(readHoulton2018)
export(readJRC_IDEES)
export(readLPJmLClimateInput)
export(toolAggregateCell2Country)
export(toolCalcIEAfromStructureMappingPEFE)
export(toolCell2isoCell)
export(toolClimateInputVersion)
export(toolCoord2Isocell)
export(toolCoord2Isocoord)
export(toolCountryFillBilateral)
export(toolExtrapolateFodder)
export(toolFAOcombine)
export(toolForestRelocate)
export(toolFreezeEffect)
export(toolGetMappingCoord2Country)
export(toolHarmonize2Baseline)
export(toolHoldConstantBeyondEnd)
export(toolIso2CellCountries)
export(toolLPJmLVersion)
export(toolPregnant)
export(toolSmooth)
export(toolSum2Country)
import(madrat)
import(magclass)
import(mrdrivers)
import(mrfaocore)
import(mrlandcore)
import(mstools)
importFrom(GDPuc,convertGDP)
importFrom(SPEI,thornthwaite)
importFrom(countrycode,countrycode)
importFrom(data.table,":=")
importFrom(data.table,as.data.table)
Expand Down Expand Up @@ -84,16 +64,10 @@ importFrom(dplyr,rename)
importFrom(dplyr,right_join)
importFrom(dplyr,select)
importFrom(dplyr,summarise)
importFrom(dplyr,ungroup)
importFrom(graphics,plot)
importFrom(hdf5r,h5file)
importFrom(lpjclass,read.LPJ_input)
importFrom(lpjclass,readLPJ)
importFrom(lpjmlkit,read_io)
importFrom(luscale,getAggregationMatrix)
importFrom(luscale,groupAggregate)
importFrom(luscale,rename_dimnames)
importFrom(luscale,speed_aggregate)
importFrom(madrat,calcOutput)
importFrom(madrat,getISOlist)
importFrom(madrat,metadataGFZ)
Expand All @@ -107,11 +81,8 @@ importFrom(madrat,toolFillWithRegionAvg)
importFrom(madrat,toolFillYears)
importFrom(madrat,toolGetMapping)
importFrom(madrat,toolNAreplace)
importFrom(madrat,toolOrderCells)
importFrom(madrat,toolSplitSubtype)
importFrom(madrat,toolSubtypeSelect)
importFrom(madrat,toolTimeAverage)
importFrom(madrat,toolTimeSpline)
importFrom(magclass,"getItems<-")
importFrom(magclass,"getNames<-")
importFrom(magclass,"getSets<-")
Expand All @@ -123,14 +94,11 @@ importFrom(magclass,as.magpie)
importFrom(magclass,clean_magpie)
importFrom(magclass,collapseDim)
importFrom(magclass,collapseNames)
importFrom(magclass,complete_magpie)
importFrom(magclass,convergence)
importFrom(magclass,dimExists)
importFrom(magclass,dimOrder)
importFrom(magclass,dimReduce)
importFrom(magclass,dimSums)
importFrom(magclass,getCPR)
importFrom(magclass,getCells)
importFrom(magclass,getCoords)
importFrom(magclass,getItems)
importFrom(magclass,getNames)
Expand All @@ -140,13 +108,10 @@ importFrom(magclass,getYears)
importFrom(magclass,hasCoords)
importFrom(magclass,lowpass)
importFrom(magclass,magpie_expand)
importFrom(magclass,magpiesort)
importFrom(magclass,mbind)
importFrom(magclass,mselect)
importFrom(magclass,ncells)
importFrom(magclass,ndim)
importFrom(magclass,new.magpie)
importFrom(magclass,nyears)
importFrom(magclass,read.magpie)
importFrom(magclass,read.report)
importFrom(magclass,setCells)
Expand All @@ -163,11 +128,9 @@ importFrom(magpiesets,reporthelper)
importFrom(magpiesets,reportingnames)
importFrom(methods,new)
importFrom(mstools,toolFertilizerDistribution)
importFrom(mstools,toolHoldConstant)
importFrom(ncdf4,nc_close)
importFrom(ncdf4,nc_open)
importFrom(ncdf4,ncvar_get)
importFrom(nleqslv,nleqslv)
importFrom(openxlsx,read.xlsx)
importFrom(purrr,map)
importFrom(purrr,map2)
Expand Down Expand Up @@ -206,21 +169,12 @@ importFrom(stats,na.omit)
importFrom(stats,quantile)
importFrom(stats,reshape)
importFrom(stats,xtabs)
importFrom(stringr,str_count)
importFrom(stringr,str_detect)
importFrom(stringr,str_extract)
importFrom(stringr,str_match)
importFrom(stringr,str_split)
importFrom(stringr,str_sub)
importFrom(stringr,str_subset)
importFrom(stringr,str_trim)
importFrom(terra,"ext<-")
importFrom(terra,aggregate)
importFrom(terra,app)
importFrom(terra,classify)
importFrom(terra,ext)
importFrom(terra,focal)
importFrom(terra,project)
importFrom(terra,rast)
importFrom(terra,rasterize)
importFrom(terra,segregate)
Expand All @@ -240,17 +194,13 @@ importFrom(tidyr,replace_na)
importFrom(tidyr,starts_with)
importFrom(tidyr,unite)
importFrom(tidyr,unnest)
importFrom(tools,file_ext)
importFrom(tools,file_path_sans_ext)
importFrom(utils,bibentry)
importFrom(utils,capture.output)
importFrom(utils,download.file)
importFrom(utils,head)
importFrom(utils,packageVersion)
importFrom(utils,person)
importFrom(utils,read.csv)
importFrom(utils,read.csv2)
importFrom(utils,read.delim)
importFrom(utils,read.table)
importFrom(utils,tail)
importFrom(utils,unzip)
Expand Down
22 changes: 0 additions & 22 deletions R/calcAttributes.R

This file was deleted.

2 changes: 0 additions & 2 deletions R/calcBodyHeight.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
#' Also,the year 1965 is extrapolatedusing the worldbank population
#' data and sex, age, and education structure of 1970.
#' @export
#' @importFrom luscale speed_aggregate

calcBodyHeight <- function(convert = TRUE) {

demo <- calcOutput("Demography", education = FALSE, aggregate = FALSE)
Expand Down
Loading

0 comments on commit b75b733

Please sign in to comment.