-
Notifications
You must be signed in to change notification settings - Fork 15
/
test-lehdr.R
44 lines (40 loc) · 2.23 KB
/
test-lehdr.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
test_that("test grab lodes od", {
expect_equal(grab_lodes(state = 'or', year = 2014, lodes_type = "od", job_type = "JT01",
segment = "SA01", state_part = "main", agg_geo = "tract") %>%
dim, c(223119, 14))
expect_equal(grab_lodes(state = "or", year = "2015", lodes_type = "od", job_type = "JT01",
segment = "SA01", state_part = "main" ) %>%
dim, c(1410831, 15))
})
test_that("test grab lodes rac", {
expect_equal(grab_lodes(state = 'or', year = 2014, lodes_type = "rac", job_type = "JT01",
segment = "SA01", agg_geo = "tract") %>%
dim, c(834, 44))
expect_equal(grab_lodes(state = "or", year = "2015", lodes_type = "rac", job_type = "JT01",
segment = "SA01") %>%
dim, c(60227, 45))
})
test_that("test grab lodes wac", {
expect_equal(grab_lodes(state = 'or', year = 2014, lodes_type = "wac", job_type = "JT01",
segment = "SA01", agg_geo = "tract") %>%
dim, c(825, 54))
expect_equal(grab_lodes(state = "or", year = "2015", lodes_type = "wac", job_type = "JT01",
segment = "SA01") %>%
dim, c(23367, 55))
})
test_that("test grab lodes od for multiple states and years", {
expect_equal(grab_lodes(state = c('or', "ri"), year = c(2013, 2014), lodes_type = "od", job_type = "JT01",
segment = "SA01", state_part = "main", agg_geo = "tract") %>%
dim, c(511071, 14))
expect_equal(grab_lodes(state = c('or', "ri"), year = c(2013, 2014), lodes_type = "od", job_type = "JT01",
segment = "SA01", state_part = "main" ) %>%
dim, c(3326655, 15))
})
test_that("test grab lodes wac for multiple states and years", {
expect_equal(grab_lodes(state = c('or', "ri"), year = c(2013, 2014), lodes_type = "wac", job_type = "JT01",
segment = "SA01", agg_geo = "tract") %>%
dim, c(2132, 54))
expect_equal(grab_lodes(state = c('or', "ri"), year = c(2013, 2014), lodes_type = "wac", job_type = "JT01",
segment = "SA01") %>%
dim, c(55307, 55))
})