1
1
2
2
<!-- README.md is generated from README.Rmd. Please edit that file -->
3
3
4
- # statgl
4
+ # statgl < img src = " man/figures/logo.png " align = " right " height = " 139 " alt = " " />
5
5
6
6
Query and visualize data published by Statistics Greenland.
7
7
@@ -19,7 +19,7 @@ To load the package contents to the R environment, run:
19
19
20
20
``` r
21
21
library(statgl )
22
- # > R Statistics Greenland (0.2.2.9009 )
22
+ # > R Statistics Greenland (0.2.2.92 )
23
23
```
24
24
25
25
## Search
@@ -28,20 +28,21 @@ Use `statgl_search` to do a freetext search of the Greenland Statbank:
28
28
29
29
``` r
30
30
statgl_search(" population jan* 1st" )
31
- # > # A tibble: 137 × 6
31
+ # > # A tibble: 12 × 6
32
32
# > id title type path score published
33
33
# > <chr> <chr> <chr> <chr> <dbl> <chr>
34
- # > 1 BEXSTA Population January 1st 1977-2023 t /BE/… 0.342 2023-02-…
35
- # > 2 BEXST1 Population January 1st 1977-2020 t /BE/… 0.342 2020-02-…
36
- # > 3 BEXSTAYY Population January 1st, fixed residence… t /BE/… 0.290 2023-02-…
37
- # > 4 BEXSTB Population in Municipalities January 1s… t /BE/… 0.290 2023-02-…
38
- # > 5 BEXSTC Population in Districts and Municipalit… t /BE/… 0.290 2023-02-…
39
- # > 6 BEXSTD Population in Localities January 1st 19… t /BE/… 0.290 2023-02-…
40
- # > 7 BEXSTDt Population seniority in Localities Janu… t /BE/… 0.290 2023-02-…
41
- # > 8 BEXSTNUK Population In Nuuk January 1st by cityd… t /BE/… 0.290 2023-02-…
42
- # > 9 BEXST2A Population in municipalities(2018) Jan… t /BE/… 0.290 2017-10-…
43
- # > 10 BEXST2 Population in Municipalities January 1s… t /BE/… 0.290 2020-02-…
44
- # > # ℹ 127 more rows
34
+ # > 1 BEXSTA Population January 1st 1977-2024 t /BE/… 0.344 2024-02-…
35
+ # > 2 BEXST1 Population January 1st 1977-2020 t /BE/… 0.344 2020-02-…
36
+ # > 3 BEXSTAYY Population January 1st, fixed residence… t /BE/… 0.292 2024-05-…
37
+ # > 4 BEXSTB Population in Municipalities January 1s… t /BE/… 0.292 2024-02-…
38
+ # > 5 BEXSTC Population in Districts and Municipalit… t /BE/… 0.292 2024-02-…
39
+ # > 6 BEXSTD Population in Localities January 1st 19… t /BE/… 0.292 2024-02-…
40
+ # > 7 BEXSTDt Population seniority in Localities Janu… t /BE/… 0.292 2024-02-…
41
+ # > 8 BEXSTNUK Population In Nuuk January 1st by cityd… t /BE/… 0.292 2024-02-…
42
+ # > 9 BEXST2A Population in municipalities(2018) Jan… t /BE/… 0.292 2017-10-…
43
+ # > 10 BEXST2 Population in Municipalities January 1s… t /BE/… 0.292 2020-02-…
44
+ # > 11 BEXST3 Population in Districts and Municipalit… t /BE/… 0.292 2020-02-…
45
+ # > 12 BEXST4 Population in Localities January 1st 19… t /BE/… 0.292 2020-06-…
45
46
```
46
47
47
48
## Fetch
@@ -51,7 +52,7 @@ collected by `statgl_fetch`:
51
52
52
53
``` r
53
54
statgl_fetch(" BEESTA" )
54
- # > # A tibble: 47 × 2
55
+ # > # A tibble: 48 × 2
55
56
# > time value
56
57
# > <chr> <int>
57
58
# > 1 1977 49717
@@ -64,7 +65,7 @@ statgl_fetch("BEESTA")
64
65
# > 8 1984 52347
65
66
# > 9 1985 52940
66
67
# > 10 1986 53406
67
- # > # ℹ 37 more rows
68
+ # > # ℹ 38 more rows
68
69
```
69
70
70
71
Eliminable variables are removed by default. To see which variables can
@@ -86,14 +87,14 @@ statgl_meta("BEESTA")
86
87
# > 2 gender gender TRUE NA <chr [3]> <chr [3]>
87
88
# > 3 place of birth place of birth TRUE NA <chr [3]> <chr [3]>
88
89
# > 4 residence type residence type TRUE NA <chr [8]> <chr [8]>
89
- # > 5 time time NA TRUE <chr [47 ]> <chr [47 ]>
90
+ # > 5 time time NA TRUE <chr [48 ]> <chr [48 ]>
90
91
```
91
92
92
93
Codes from ` values ` columns can be used to query:
93
94
94
95
``` r
95
96
statgl_fetch(" BEESTA" , gender = c(" M" , " K" ), age = 0 : 99 )
96
- # > # A tibble: 9,400 × 4
97
+ # > # A tibble: 9,600 × 4
97
98
# > gender age time value
98
99
# > <chr> <chr> <chr> <int>
99
100
# > 1 Men 0 1977 428
@@ -106,15 +107,15 @@ statgl_fetch("BEESTA", gender = c("M", "K"), age = 0:99)
106
107
# > 8 Men 0 1984 494
107
108
# > 9 Men 0 1985 519
108
109
# > 10 Men 0 1986 564
109
- # > # ℹ 9,390 more rows
110
+ # > # ℹ 9,590 more rows
110
111
```
111
112
112
113
Use ` .eliminate_rest = FALSE ` to show all values of remaining
113
114
eliminables:
114
115
115
116
``` r
116
117
statgl_fetch(" BEXSTA" , .eliminate_rest = FALSE )
117
- # > # A tibble: 338,400 × 6
118
+ # > # A tibble: 345,600 × 6
118
119
# > `place of birth` gender age `residence type` time value
119
120
# > <chr> <chr> <chr> <chr> <chr> <int>
120
121
# > 1 Total Total 0 Total 1977 820
@@ -127,7 +128,7 @@ statgl_fetch("BEXSTA", .eliminate_rest = FALSE)
127
128
# > 8 Total Total 0 Total 1984 946
128
129
# > 9 Total Total 0 Total 1985 996
129
130
# > 10 Total Total 0 Total 1986 1115
130
- # > # ℹ 338,390 more rows
131
+ # > # ℹ 345,590 more rows
131
132
```
132
133
133
134
## ggplot
0 commit comments