GithubHelp home page GithubHelp 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 People

Contributors

hsonne avatar mrustl avatar

Watchers

 avatar  avatar  avatar  avatar

kwb.budget's Issues

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>

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

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.