Giter Site home page Giter Site logo

Comments (4)

bhatiadivij avatar bhatiadivij commented on August 13, 2024

There's an error in specifying the region. The right attribute should be E instead of D
@szeke

from t2wml.

szeke avatar szeke commented on August 13, 2024

Ah, thanks, what I get for doing things late.

I am stuck on another problem. I want to define one YAML file that works for all the files in the folder, tabula-UNDPEUE_WEREDA2000-0.csv, to -14.csv. The problem is that in column D, where the data is, the data does not always start in the same row, or ends in the same row. I got the bottom to work correctly, but can't get the top to work. I want the top to be the row after C = "Wereda" as in

statementMapping:
  region:
    - left: C
      right: E
      top: value(C/$top+n) = "Wereda" -> $top+n+1
      bottom: value(C/$top+n) = "" -> $top+n 
      skip_row:
        - value(C/$row) = "Sub Total" 
  template:
    item: item(C/$row)
    property: P1082
    value: value($col/$row)

from t2wml.

bhatiadivij avatar bhatiadivij commented on August 13, 2024

I don't think it is a good idea to specify top in terms of top. This problem can be easily solved if we specify row 0 as the base row instead of $top.
Also, specifying bottom: value(C/$top+n) won't work as in some of the data files, the cell just below C= "Wereda" is empty which makes this condition true.
Following T2WML spec will work on all the files:

statementMapping:
  region:
    - left: C
      right: E
      top: value(C/0+n) = "Wereda" -> 0+n
      bottom: value(A:C/$top+n) = "" -> $top+n 
      skip_row:
        - value(C/$row) = "Sub Total" 
  template:
    item: item(C/$row)
    property: P1082
    value: value($col/$row)

from t2wml.

szeke avatar szeke commented on August 13, 2024

Thanks

from t2wml.

Related Issues (20)

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.