-
Notifications
You must be signed in to change notification settings - Fork 4
/
02_download_data.log
80 lines (68 loc) · 2.83 KB
/
02_download_data.log
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
___ ____ ____ ____ ____ (R)
/__ / ____/ / ____/
___/ / /___/ / /___/ 13.1 Copyright 1985-2013 StataCorp LP
Statistics/Data Analysis StataCorp
4905 Lakeway Drive
Special Edition College Station, Texas 77845 USA
800-STATA-PC http://www.stata.com
979-696-4600 [email protected]
979-696-4601 (fax)
6-user Stata network perpetual license:
Serial number: 501306214221
Licensed to: Miklos Koren
Central European University
Notes:
1. (-v# option or -set maxvar-) 5000 maximum variables
2. Command line editing disabled
3. Stata running in batch mode
Note: Your site can add messages to the introduction by editing the file
stata.msg in the directory where Stata is installed.
. do code/02_download_data.do
. /*
> The programs and data files replicate the descriptive statistics and the esti
> mation results in the paper
>
> Hornok, Cec’lia and Mikl—s Koren, forthcoming. ÒPer-Shipment Costs an
> d the Lumpiness of International Trade.Ó Review of Economics and Statistics.
>
> Please cite the above paper when using these programs.
>
> For your convenience, we reproduce some of the data resources here. Although
> all of these are widely available macroeconomic data, please check with the d
> ata vendors whether you have the right to use them.
>
> Our software and data are provided AS IS, and we assume no liability for thei
> r use or misuse.
>
> If you have any questions about replication, please contact Mikl—s Koren at k
> */
.
. *** Downloads all data from the available internet resources and saves them t
> o the folder data/. This script uses a Unix shell, so requires Unix, Linux or
> Mac OS X. If you are running Windows, check how to use zip and gzip from the
> command line. We have saved the output of this script in data/ for your conv
> enience, so you can skip the downloads.
.
. set more off
.
. * unzip Census trade data
. shell gunzip -r data/census/trade
.
. * read unilateral vars from CEPII
. copy "http://www.cepii.fr/distance/geo_cepii.dta" data/cepii/geo_cepii.dta, r
> eplace
.
. * read bilateral vars from CEPII
. copy "http://www.cepii.fr/distance/dist_cepii.dta" data/cepii/dist_cepii.dta,
> replace
.
. * read census numerical codes
. copy "http://www.census.gov/foreign-trade/schedules/c/country.txt" data/censu
> s/country.txt, replace text
.
. * indicators from World Bank Data API
. foreach indicator in ny.gdp.pcap.cd ny.gdp.mktp.cd ic.exp.cost.imp ic.exp.tim
> e.imp {
2. capture wbopendata, indicator(`indicator') year(2009) clear long
3. saveold data/worldbank/`indicator'.dta, replace