GithubHelp home page GithubHelp logo

ebuckley / legislation_as_code Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 1.0 34 KB

An example implementation of legislation as code, using the rates rebate legislation as an example

License: MIT License

Jupyter Notebook 100.00%

legislation_as_code's People

Contributors

ebuckley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

rex-tech-home

legislation_as_code's Issues

Formula very different to the actual legal text

Hello,

The formula you used in your code is quite straightforward:
(household_income - base_rate) / (dependants_number * 0.1 * rate)

However, disregarding the constants which change on a regular basis, the law specify a wealth of other conditions:
Screenshot 2023-11-22 at 10 46 12
And so, the formula used does not: 1) take into account 2/3 of amounts exceeding a threshold; 2) consider $1 for each $8 exceeding a threshold,; 3) adjust it for each dependent by $500, etc.
A formula much closer to the text would appear to be:
Screenshot 2023-11-22 at 10 48 54

I've been digging through the minutes and documents published but could not find any explanation as to the choice of the formula, despite it being a crucial element in encoding the Rates Rebate Act. Would you be able to let us know how you came to choosing this formula? Why did you disregard certain elements in the original legal text?

Using the example which you have in your code (household income of 45000, 2 dependents, 2000 rate), your output gives a rate of 75, whereas the closed formula from above yields 0---quite a notable difference in other words.

We're in the midst of writing an academic book on the subject and would very much appreciate being able to include a rationale behind this discrepancy.

Many thanks in advance for your answer!
Best wishes,
Clement

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.