Liking cljdoc? Tell your friends :D

eorscope-employer-costs

Clojure library that embeds the EOR Scope dataset of statutory employer charges in 76 countries, as read-only data. No runtime dependency besides Clojure, no network calls.

Each country record holds the employer rate at an example salary, the employer charges in US dollars per year and per month, the local currency, the number of statutory lines and the review date.

Source of the data: the EOR Scope open dataset (CC BY 4.0). How each figure is sourced and checked is set out in the methodology.

Statutory figures, not legal or tax advice.

Install

Leiningen:

[net.clojars.eorscope/eorscope-employer-costs "0.1.0"]

deps.edn:

net.clojars.eorscope/eorscope-employer-costs {:mvn/version "0.1.0"}

Usage

(require '[eorscope.employer-costs :as ec])

(count (ec/countries))      ;; => 76, sorted by ISO code

(:country (ec/country "DE")) ;; => "Germany"

(ec/employer-rate "DE")     ;; => {:rate-pct 22.3, :floor? false}

(ec/employer-charges "DE")
;; => {:usd-year 16688, :usd-month 1391, :floor? false,
;;     :example-role "Software engineer", :example-salary-usd-year 75000}

(ec/employer-rate "IN")     ;; => {:rate-pct 3.8, :floor? true}, read as "at least 3.8%"

(ec/country "ZZ")           ;; => nil

ISO codes are case-insensitive strings or keywords. An unknown code returns nil.

The library is a lookup: it returns the figures as exported and computes nothing. Example salaries are illustrative and differ by country, so the charges of two countries do not compare like for like.

"At least" figures

When :floor? is true, the source states the total of that country as a floor. Read its rate and its charges as "at least" the figure returned, never as a total. This applies to 13 countries:

  • Argentina: at least 36.9%
  • Chile: at least 14.4%
  • Costa Rica: at least 35.2%
  • Dominican Republic: at least 22.8%
  • Ecuador: at least 21.8%
  • India: at least 3.8%
  • Israel: at least 15.3%
  • Peru: at least 36.9%
  • Qatar: at least 2.9%
  • Saudi Arabia: at least 6.0%
  • Sri Lanka: at least 15.0%
  • United Arab Emirates: at least 2.9%
  • Uruguay: at least 25.4%

Updating the data

lein gen-data [csv-path] rewrites resources/eorscope/employer_charges.edn from a dataset CSV (default data/eorscope-employer-charges.csv). Then run lein test.

Licence

Code: MIT, see LICENSE. Data: CC BY 4.0, see LICENSE-DATA.

Attribution: EOR Scope, published by Trésor Kaya EI (Les Créavores), France.

Can you improve this documentation?Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close