Skip to content

Commit d691404

Browse files
committed
Use size cutoffs in sales. 10m HUF for lower, 16b HUF for upper, following #24
1 parent 2180571 commit d691404

9 files changed

+103
-137
lines changed

output/fig/export_share.png

-24.4 KB
Loading

output/fig/exporter_share.png

-5.93 KB
Loading

output/fig/gdp_per_worker.png

-3.07 KB
Loading

output/fig/n_firms.png

-631 Bytes
Loading

output/fig/n_firms_export.png

2.48 KB
Loading

output/fig/n_new_firms.png

1.46 KB
Loading

output/fig/sales_per_worker.png

-11.3 KB
Loading

output/lakmusz.csv

+99-132
Large diffs are not rendered by default.

src/functions.jl

+4-5
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ left(text::AbstractString, n::Int) = n > 0 ? text[1:min(n, end)] : text[1:end-mi
22
right(text::AbstractString, n::Int) = n > 0 ? text[end-min(n, end)+1:end] : text[min(-n, end)+1:end]
33

44
function size_category(size::Number)
5-
size < 10 && return "micro"
6-
size < 50 && return "small"
7-
size < 250 && return "medium"
5+
size < 100_000 && return "small"
6+
size < 16_000_000 && return "medium"
87
return "large"
98
end
109

@@ -119,8 +118,8 @@ function clean_balance(df::AbstractDataFrame)
119118

120119
@keep frame_id_numeric originalid id_type year sales emp tanass Export egyebbev aktivalt ranyag wbill persexp kecs ereduzem pretax jetok immat teaor08_2d foundyear firmage gdp tax ppi22 teaor08_1d county final_netgep so3_with_mo3 do3 fo3
121120

122-
@replace emp = 0 @if ismissing(emp)
123-
@generate size_category = size_category(emp)
121+
@replace sales = 0 @if ismissing(sales)
122+
@generate size_category = size_category(sales)
124123

125124
@generate ownership = "foreign" @if fo3 == 1
126125
@replace ownership = "state" @if so3_with_mo3 == 1

0 commit comments

Comments
 (0)