{"id":15814168,"url":"https://github.com/jfoclpf/ploteffectivetaxrate","last_synced_at":"2025-04-01T01:49:59.614Z","repository":{"id":85550799,"uuid":"106961660","full_name":"jfoclpf/plotEffectiveTaxRate","owner":"jfoclpf","description":"Calculate and plot Effective Tax Rate","archived":false,"fork":false,"pushed_at":"2021-10-12T20:33:43.000Z","size":59,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-06T04:22:56.198Z","etag":null,"topics":["income-tax","matlab-functions","octave-functions","octave-plot"],"latest_commit_sha":null,"homepage":"","language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jfoclpf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-14T20:46:27.000Z","updated_at":"2021-11-28T00:11:15.000Z","dependencies_parsed_at":"2023-06-26T02:00:18.402Z","dependency_job_id":null,"html_url":"https://github.com/jfoclpf/plotEffectiveTaxRate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfoclpf%2FplotEffectiveTaxRate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfoclpf%2FplotEffectiveTaxRate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfoclpf%2FplotEffectiveTaxRate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfoclpf%2FplotEffectiveTaxRate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jfoclpf","download_url":"https://codeload.github.com/jfoclpf/plotEffectiveTaxRate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246569007,"owners_count":20798341,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["income-tax","matlab-functions","octave-functions","octave-plot"],"created_at":"2024-10-05T04:23:16.014Z","updated_at":"2025-04-01T01:49:59.587Z","avatar_url":"https://github.com/jfoclpf.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"## What is an effective income tax rate?\n\nThe actual rate at which a taxpayer pays taxes on income accounting for all taxes and offsets. The rate is calculated by dividing the total of all taxes paid, less offsets, by the total taxable income. The effective rate is typically lower than the tax bracket, which is currently based on a progressive rate scale.\n\n## How to use it\n\n1. Install [Octave](https://www.gnu.org/software/octave/download)\n2. In Octave command line, download the function into a `.m` file\n```octave\nurlwrite(\"https://raw.githubusercontent.com/jfoclpf/plotEffectiveTaxRate/master/plotEffectiveTaxRate.m\", \"plotEffectiveTaxRate.m\" )\n```\n3. Now run, for example\n```octave\nplotEffectiveTaxRate([0, 7091, 20261, 40552, 80640], [14.5, 28.5, 37, 45, 48])\n```\n\n\n## Function syntax\n\n```octave\nplotEffectiveTaxRate(tax_brackets_array, tax_rates_array [, colour_code])\n```\n\n * The first item of `tax_brackets_array` must always be zero. \n * The `tax_rates_array` values must be inserted already as percentages, i.e., for a 20% tax, use `20` inseatd of `.2`  \n * The arrays must have the same size.\n\n#### Colour codes\n\nThe colour codes are the same applied for the Octave function `plot`, namely\n\n* ‘k’\tblacK\n* ‘r’\tRed\n* ‘g’\tGreen\n* ‘b’\tBlue\n* ‘y’\tYellow\n* ‘m’\tMagenta\n* ‘c’\tCyan\n* ‘w’\tWhite\n\n## Example\n\nThe Portuguese progressive income tax for the year 2017 is according to the table:\n\n\n| Value (€)               | Tax (%)  |\n| ----------------------- | -------- |\n|   less than 7091             | 14.5     |\n| between 7091 and 20261  | 28.5     |\n| between 20261 and 40552 | 37       |\n| between 40552 and 80640 | 45       |\n|   more than 80640       | 48       |\n\nThus, you need to run\n\n```octave\nplotEffectiveTaxRate([0, 7091, 20261, 40552, 80640], [14.5, 28.5, 37, 45, 48])\n```\n\nwhich outputs\n\n\u003cimg src=\"https://github.com/jfoclpf/plotEffectiveTaxRate/blob/master/images/graph.png?raw=true\"\u003e\u003c/img\u003e\n\nAnother example for the Portuguese progressive income tax for the year 2018\n\n```octave\nplotEffectiveTaxRate([0, 7091, 10700, 20261, 25000, 36856, 80640], [14.5, 23, 28.5, 35, 37, 45, 48], \"r\")\n```\n\nwhich outputs\n\n\u003cimg src=\"https://github.com/jfoclpf/plotEffectiveTaxRate/blob/master/images/graph2.png?raw=true\"\u003e\u003c/img\u003e\n\n## Multiple charts\n\nFor multiple charts use the Octave commands `hold on` and `hold off`. For example\n\n ```octave\n plotEffectiveTaxRate([0, 7091, 20261, 40552, 80640], [14.5, 28.5, 37, 45, 48], \"b\")\n hold on\n plotEffectiveTaxRate([0, 7091, 10700, 20261, 25000, 36856, 80640], [14.5, 23, 28.5, 35, 37, 45, 48], \"r\")\n hold off\n ```\n \n which outpurts\n \n \u003cimg src=\"https://github.com/jfoclpf/plotEffectiveTaxRate/blob/master/images/graph3.png?raw=true\"\u003e\u003c/img\u003e\n \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfoclpf%2Fploteffectivetaxrate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjfoclpf%2Fploteffectivetaxrate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfoclpf%2Fploteffectivetaxrate/lists"}