Giter Site home page Giter Site logo

kwb-r / kwb.budget Goto Github PK

View Code? Open in Web Editor NEW
0.0 4.0 0.0 237 KB

R Package For Aggregating and Analysing Budget Excel Files from Project Partners

Home Page: https://kwb-r.github.io/kwb.budget

License: MIT License

R 100.00%
rstats r-package project-development

kwb.budget's Introduction

Appveyor build Status Travis build Status codecov Project Status CRAN_Status_Badge

kwb.budget

R package useful during project development (e.g. H2020 calls with many project partners). By using a budget EXCEL template file, data received from the different partners can be aggregated and analysed.)

Installation

For details on how to install KWB-R packages checkout our installation tutorial.

### Optionally: specify GitHub Personal Access Token (GITHUB_PAT)
### See here why this might be important for you:
### https://kwb-r.github.io/kwb.pkgbuild/articles/install.html#set-your-github_pat

# Sys.setenv(GITHUB_PAT = "mysecret_access_token")

# Install package "remotes" from CRAN
if (! require("remotes")) {
  install.packages("remotes", repos = "https://cloud.r-project.org")
}

# Install KWB package 'kwb.budget' from GitHub
remotes::install_github("KWB-R/kwb.budget")

Documentation

Release: https://kwb-r.github.io/kwb.budget

Development: https://kwb-r.github.io/kwb.budget/dev

kwb.budget's People

Contributors

hsonne avatar mrustl avatar

Watchers

 avatar  avatar  avatar  avatar

kwb.budget's Issues

workflow: improve merging of "partner-metadata"

In the old R script there is a lookup table Partner_type_country.csv (see: KWB-R/kwb.nextcloud#9 (comment))

Budget/
Budget/10_Filled_out_forms/....
Budget/20_Summary_Files/Partner_country_type.csv

For the merging with the partner metadata a check

# check if names are the same in the two files before merging
is performed which will fail in case the partner's "short_name" entered in the EXCEL file will differ from the one in Partner_type_country.csv.

Possible workarounds:

  • Option 1: prepare EXCEL template for each partner with prefilled "short_name" with "read-only" by using openxlsx::writedata()

  • Option 2: code "short_name" in EXCEL file name, e.g. dwh_partner-budget_kwb.xlsx

Import problem with openxlsx

Maybe an openxlsx issue (in 2be6cc2). But as old version with kwb.db is not working on my computer I don`t know wether this also happens there @hsonne.

file <- "...../xxx_Arctik_FINAL.xlsx"
region_names <- as.character(openxlsx::getNamedRegions(file))

 lapply(region_names, function(name) {
   try(openxlsx::read.xlsx(file, namedRegion = name))
 })

print(region_names)
 [1] "average_person_month"       "details_consumables"        "details_equipment"          "details_personnel"         
 [5] "details_subcontracting"     "details_travelling"         "range_average_person_month" "range_consumables"         
 [9] "range_contact"              "range_direct"               "range_equipment"            "range_indirect"            
[13] "range_partner"              "range_personnel"            "range_subcontracting"       "range_total"               
[17] "range_travelling"           "selectwp"                   "threshold_justification"    "total_consumables"         
[21] "total_direct"               "total_equipment"            "total_indirect"             "total_personnel"           
[25] "total_subcontracting"       "total_travelling" 

[[18]]
[1] "Error in gsub(sheet, \"\", region, fixed = TRUE) : \n  ungültiges 'pattern' Argument\n"
attr(,"class")
[1] "try-error"
attr(,"condition")
<simpleError in gsub(sheet, "", region, fixed = TRUE): ungültiges 'pattern' Argument>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.