-
Notifications
You must be signed in to change notification settings - Fork 6
/
bds.Rmd
113 lines (85 loc) · 8.85 KB
/
bds.Rmd
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
---
title: "Download data from Business Dynamics Statistics"
author: "Erik Loualiche"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
#output:
# md_document:
# variant: markdown_github
always_allow_html: yes
vignette: >
%\VignetteIndexEntry{Download data from Business Dynamics Statistics}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
## General information on the dataset
+ Downloads data from the Census Business Dynamics Statistics: [**BDS** website](https://www.census.gov/ces/dataproducts/bds/).
+ The two main data resources are the [firm characteristics tables](https://www.census.gov/ces/dataproducts/bds/data_firm.html) and the [establishment characteristics tables](https://www.census.gov/ces/dataproducts/bds/data_estab.html)
+ Codebook is available [here](https://www.census.gov/ces/pdf/BDS_2014_Codebook.pdf)
## Using the package
For example to start and get the BED industry data:
```r
library(entrydatar)
dt_firm <- get_bds_cut(1977, 2014, "firm", "all")
dt_firm %>% as_tibble
```
```r
# A tibble: 38 x 25
year firms estabs emp denom estabs_entry estabs_entry_rate estabs_exit estabs_exit_rate job_creation job_creation_births job_creation_continuers job_cr… job_c… job_de… job_des… job_des… job_de… job_d… net_jo… net_jo… real… firmd… firmd… firmd…
<int> <int> <int> <int> <int> <int> <dbl> <int> <dbl> <int> <int> <int> <dbl> <dbl> <int> <int> <int> <dbl> <dbl> <int> <dbl> <dbl> <int> <int> <int>
1 1977 3417903 4153792 66091812 63987631 697749 17.1 526010 12.9 13919514 5858902 8060612 9.20 21.8 9.71e⁶ 3909657 5801496 6.10 15.2 4.21e⁶ 6.60 30.4 350748 352967 2.22e⁶
2 1978 3470239 4222683 69670352 67833282 626813 15.0 548965 13.1 14062357 4556103 9506254 6.70 20.7 1.04e⁷ 4283093 6105123 6.30 15.3 3.67e⁶ 5.40 30.6 360442 362456 2.12e⁶
3 1979 3598075 4376325 74016678 71830680 641788 14.9 471892 11.0 14443176 4998519 9444657 7.00 20.1 1.01e⁷ 3639187 6431992 5.10 14.0 4.37e⁶ 6.10 28.0 293251 294890 1.67e⁶
4 1980 3606457 4398753 74749924 74284989 580305 13.2 524356 12.0 12718175 4567680 8150495 6.10 17.1 1.18e⁷ 3948087 7840218 5.30 15.9 9.30e⁵ 1.20 31.8 371483 373364 2.12e⁶
5 1981 3566572 4341224 73539034 73601473 577646 13.2 609342 14.0 12783982 5219017 7564965 7.10 17.4 1.29e⁷ 5037764 7871097 6.80 17.5 -1.25e⁵ -0.100 34.8 365741 367682 2.13e⁶
6 1982 3603989 4470714 74482223 73952271 679970 15.4 505221 11.5 13640132 6226777 7413355 8.40 18.4 1.26e⁷ 4052461 8527768 5.50 17.0 1.06e⁶ 1.40 34.0 289788 290402 1.78e⁶
7 1983 3688193 4556830 72716864 73461522 570715 12.6 514341 11.4 12154727 4725016 7429711 6.40 16.5 1.36e⁷ 4234634 9409409 5.80 18.6 -1.49e⁶ -2.10 33.0 328482 330449 1.96e⁶
8 1984 3836247 4722769 77386763 75061635 662923 14.3 503719 10.9 14882807 5379201 9503606 7.20 19.8 1.02e⁷ 3776750 6455800 5.00 13.6 4.65e⁶ 6.20 27.2 309350 310909 1.75e⁶
9 1985 3975680 4876912 80896889 79558329 673580 14.0 530696 11.0 14585960 5364968 9220992 6.70 18.3 1.19e⁷ 4697213 7211629 5.90 15.0 2.68e⁶ 3.30 30.0 336927 339182 2.20e⁶
10 1986 4085604 5010299 83467838 82133265 711750 14.4 559089 11.3 15485316 6244185 9241131 7.60 18.9 1.28e⁷ 4733570 8082600 5.80 15.6 2.67e⁶ 3.30 31.2 364004 365473 2.39e⁶
# ... with 28 more rows
```
Or for another cut, say establishments from age sic (see below for the exact code for each cut)
```r
dt_estab <- get_bds_cut(1977, 2014, "establishment", "agesic")
dt_estab %>% as_tibble
```
```r
# A tibble: 3,249 x 28
year sic1 age4 Firms Estabs Emp Denom Estabs_Entry Estabs_Entry_Rate Estabs_Exit Estabs_Exit_Rate Job_Creation Job_Creation_Births Job_Cr… Job_C… Job_… Job_D… Job_D… Job_D… Job_… Job_… Net_Jo… Net_Job… Real… d_fl… firm… firm… firmd…
<int> <int> <chr> <int> <int> <int> <int> <int> <dbl> <int> <dbl> <int> <int> <int> <dbl> <dbl> <int> <int> <int> <dbl> <dbl> <int> <dbl> <dbl> <int> <int> <int> <dbl>
1 1977 7 a) 0 7479 7591 64866 34491 7306 192 0 0 60750 60750 0 176 176 0 0 0 0 0 60750 176 0 0 NA NA NA
2 1977 7 l) Left Censored 28553 29385 210685 219312 0 0 7083 21.4 45107 0 45107 0 20.6 6.24e⁴ 28458 3.39e⁴ 13.0 28.4 - 17253 - 7.80 41.2 0 4996 5006 19331
3 1977 10 a) 0 3662 4440 77072 39356 4347 196 0 0 75432 75432 0 192 192 0 0 0 0 0 75432 192 0 0 NA NA NA
4 1977 10 l) Left Censored 16075 21008 723184 730692 0 0 3193 14.1 108765 0 108765 0 14.9 1.24e⁵ 50050 7.37e⁴ 6.80 16.9 - 15016 - 2.00 29.8 0 1949 1958 20198
5 1977 15 a) 0 83214 83723 372953 190165 81821 196 0 0 365576 365576 0 192 192 0 0 0 0 0 365576 192 0 0 NA NA NA
6 1977 15 l) Left Censored 300699 305193 3025448 3109120 0 0 56837 16.9 615519 0 615519 0 19.8 7.83e⁵ 261504 5.21e⁵ 8.40 25.2 -167345 - 5.40 39.6 0 38150 38173 174431
7 1977 20 a) 0 36857 39676 809767 420084 38800 196 0 0 779366 779366 0 186 186 0 0 0 0 0 779366 186 0 0 NA NA NA
8 1977 20 l) Left Censored 225993 277074 18516415 18433776 0 0 31186 10.6 1945895 0 1945895 0 10.6 1.78e⁶ 544425 1.24e⁶ 3.00 9.70 165279 0.900 19.4 0 21326 21409 252009
9 1977 40 a) 0 21528 25312 264124 135285 24749 196 0 0 257679 257679 0 190 190 0 0 0 0 0 257679 190 0 0 NA NA NA
10 1977 40 l) Left Censored 100563 138125 4039386 3972134 0 0 17462 11.9 722946 0 722946 0 18.2 5.88e⁵ 139602 4.49e⁵ 3.50 14.8 134505 3.40 29.6 0 11998 12059 74049
# ... with 3,239 more rows
```
## Detailed documentation
### Detail of the data
#### By **national** firm characteristics
+ Economy Wide [`all`](https://www2.census.gov/ces/bds/firm/bds_f_all_release.csv)
+ Sector [`sic`](https://www2.census.gov/ces/bds/firm/bds_f_sic_release.csv)
+ Firm Size [`sz`](https://www2.census.gov/ces/bds/firm/bds_f_sz_release.csv)
+ Initial Firm Size [`isz`](https://www2.census.gov/ces/bds/firm/bds_f_isz_release.csv)
+ Firm Age [`age`](https://www2.census.gov/ces/bds/firm/bds_f_age_release.csv)
#### By **geography**
+ State [`st`](https://www2.census.gov/ces/bds/firm/bds_f_st_release.csv)
+ Metro [`metrononmetro`](https://www2.census.gov/ces/bds/firm/bds_f_metrononmetro_release.csv)
+ MSA [`msa`](https://www2.census.gov/ces/bds/firm/bds_f_msa_release.csv)
#### By **age** interacted with ...
+ Age x Size [`agesz`](https://www2.census.gov/ces/bds/firm/bds_f_agesz_release.csv)
+ Age x Initial Size [`ageisz`](https://www2.census.gov/ces/bds/firm/bds_f_ageisz_release.csv)
+ Age x Sector [`agesic`](https://www2.census.gov/ces/bds/firm/bds_f_agesic_release.csv)
+ Age x Metro [`agemetrononmetro`](https://www2.census.gov/ces/bds/firm/bds_f_agemetrononmetro_release.csv)
#### Other data cuts ( in progress )
4. Size by ...
5. Initial size by ...
6. Age x X x Y
---------------------------
(c) Erik Loualiche