Skip to content

A collection of R scripts to import PATSTAT (Autumn version 2018) into a PostgreSQL database, set up indicies and foreign keys, and create some summary statistics and auxiliary variables

Notifications You must be signed in to change notification settings

JorritHimself/PATSTAT-PostgreSQL

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

PATSTAT-PostgreSQL

A collection of R scripts to import PATSTAT (Autumn version 2018) into a PostgreSQL database, set up indicies and foreign keys, and create some summary statistics and auxiliary variables.

How it works:

  1. First, set up a PosttGreSQL server (check here for instructions)
  2. Unzip the 14 PATSTAT zip files (leading to 161 further zip files tlsXXX_partXX.txt) in the folder of the corresponding R script.
  3. Run the R script Data_Upload_PostgreSQL.R placed in the same folder as the PATSTAT zip.files. You only need to enter your personal details to connect to your database in the dbConnect() call.

Warning: While the data inpurt and creation of the foreign keys runs pretty smooth, but the creation of the indices takes quite some time. Better run it over night. An alternative is also to run the calls one-by-one.

Have fun!

About

A collection of R scripts to import PATSTAT (Autumn version 2018) into a PostgreSQL database, set up indicies and foreign keys, and create some summary statistics and auxiliary variables

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 100.0%