This package allows you to easily access and work with tax information from the Danish IRS for companies and foundations who pay taxes in Denmark. The raw data is available here. The data is currently available from 2012-14, but you can automatically download 2015 data when it becomes available by specifying the end
argument in the access_tax_data
function described below.
Note: This package is in early BETA and new changes will most likely not have backward compatibility.
You can only install the development version from github, using Hadley Wickham's devtools package:
if(!require("devtools")) install.packages("devtools")
devtools::install_github("sebastianbarfort/taxdk")
The package depends on the dkstat
package currently only available from github so you need to install that as well
devtools::install_github("rOpenGov/dkstat")
The package currently offers two functions: access_tax_data
which connects to SKAT's webpage and downloads tax information for Danish Companies and price_correction
which connects to Statistics Denmark's API and downloads price correction information.
The package should be almost self explanatory. Below I offer a quick example of the two functions
library("taxdk")
df = access_tax_data()
df
#> Source: local data frame [744,315 x 20]
#>
#> cvr_nr navn se_nr indkomstår
#> (int) (chr) (int) (int)
#> 1 10002753 Kyndby Vognmandsforretning ApS 10002753 2012
#> 2 10010020 Købmagergade 25-27 1999 ApS 10010020 2012
#> 3 10013313 Uffe Simonsen Biler ApS 10013313 2012
#> 4 10014603 TØMRERMESTER JØRGEN ANDERSEN ApS 10014603 2012
#> 5 10016371 Tefcold A/S 10016371 2012
#> 6 10016525 EGEBJERG RENGØRING ApS 10016525 2012
#> 7 10017858 Kolding Trikotagefabrik 2000 ApS 10017858 2012
#> 8 10018862 Bb Offset Holding ApS 10018862 2012
#> 9 10020751 INTER ENERGIA HOLDING ApS 10020751 2012
#> 10 10021855 Jørn Nielsen Kongerslev Holding ApS 10021855 2012
#> .. ... ... ... ...
#> Variables not shown: administrationsselskabets_cvr_nr (chr), selskabstype
#> (chr), kulbrinte/tonnage (chr), skattepligtsbestemmelse (chr),
#> skattepligtig_indkomst (dbl), underskud (dbl), selskabsskat (dbl),
#> skattepligtig_kulbrinteindkomst (dbl), kulbrinteskat (dbl),
#> underskud_fratrukket_i_kulbrinteindkomst (dbl), selskabsindkomst_jf_kb
#> (dbl), underskud_fratrukket_i_selskabsindkomst_jf_kb (dbl),
#> selskabsskat_af_kb (dbl), se_nr_kulbrinte (dbl), kode_=_k_=_kulbrinte
#> (dbl), dato_ajour (dbl)
The price_correction
function takes a data frame as input and returns the data set with price correction information appended.
df = price_correction(df)
#> Joining by: "indkomstår"
head(df$pris.korrektion)
#> [1] 128.8 128.8 128.8 128.8 128.8 128.8
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.