MyNixOS website logo
Description

A Wrapper for the API of the Danish Parliament.

A wrapper for the API of the Danish Parliament. It makes it possible to get data from the API easily into a data frame. Learn more at <http://www.ft.dk/dokumenter/aabne_data>.

ftDK

The goal of ftDK is to provide an easy wrapper in R for the API of the Danish Parliament. You can see the website for the API her: http://www.ft.dk/AabneData.aspx

Installation

You can install ftDK from github with:

# install.packages("devtools")
devtools::install_github("mikkelkrogsholm/ftDK")

Example

This is a basic example which shows you how to solve a common problem:

library(ftDK)

# See the avaible endpoints 
see_endpoints()
#>  [1] "afstemning"              "afstemningstype"        
#>  [3] "aktstykke"               "aktoer"                 
#>  [5] "aktoeraktoer"            "aktoeraktoerrolle"      
#>  [7] "aktoertype"              "almdel"                 
#>  [9] "dagsordenspunkt"         "dagsordenspunktdokument"
#> [11] "dagsordenspunktsag"      "debat"                  
#> [13] "dokument"                "dokumentaktoer"         
#> [15] "dokumentaktoerrolle"     "dokumentkategori"       
#> [17] "dokumenttype"            "dokumentstatus"         
#> [19] "emneord"                 "emneorddokument"        
#> [21] "emneordsag"              "emneordstype"           
#> [23] "eusag"                   "forslag"                
#> [25] "fil"                     "kollonebeskrivelse"     
#> [27] "entitetbeskrivelse"      "moede"                  
#> [29] "moedeaktoer"             "moedestatus"            
#> [31] "moedetype"               "omtryk"                 
#> [33] "periode"                 "sag"                    
#> [35] "sagaktoer"               "sagaktoerrolle"         
#> [37] "sagdokument"             "sagdokumentrolle"       
#> [39] "sagskategori"            "sagsstatus"             
#> [41] "sagstrin"                "sagstrinaktoer"         
#> [43] "sagstrinaktoerrolle"     "sambehandlinger"        
#> [45] "sagstrindokument"        "sagstrinsstatus"        
#> [47] "sagstrinstype"           "sagstype"               
#> [49] "stemme"                  "stemmetype"

# Lets fetch the data for the "afstemning" endpoint
ft_data  <- get_ft("afstemning")
#> Fetching 1763 rows of data
#> Putting it all in to one data frame

# Lets have a look at the data
ft_data
#> # A tibble: 1,763 × 9
#>       id nummer
#>    <int>  <int>
#> 1      1    411
#> 2      2    412
#> 3      5    412
#> 4      6    410
#> 5      7    408
#> 6      8    407
#> 7      9    404
#> 8     10    405
#> 9     11    406
#> 10    12    400
#> # ... with 1,753 more rows, and 7 more variables: konklusion <chr>,
#> #   vedtaget <lgl>, kommentar <chr>, mødeid <int>, typeid <int>,
#> #   sagstrinid <int>, opdateringsdato <chr>

This is a first version of the package. It does the job of pulling data from the API. Next up will be to create more elaborate functions. Please contribute to the package if you can.

Metadata

Version

1.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows