Skip to content

Latest commit

 

History

History
60 lines (42 loc) · 3.88 KB

SETUP.md

File metadata and controls

60 lines (42 loc) · 3.88 KB

renegade-way Setup

Renegade Way is a Racket application which is only useful when data has been populated in a database. The following are required:

  • Racket - a "batteries included" Lisp
  • PostgreSQL - an open source Relational Database Management System (RDBMS)

If you are looking for a recommendation for a graphical tool to use for PostgreSQL, I have enjoyed using DBeaver.

You will likely find that doing the following is a pain and is not worth it when all you want to do is poke around. I understand.

Schema

Once Racket and PostgreSQL are installed, you will need to set up your database schema. That can be done with the following schema.sql files:

Simply pass these schema.sql files to psql or paste and run the contents in DBeaver. Please ensure you have configured your database in such a way that you can create schemas, tables, types (enums), and functions as that is what these schema.sql files will be doing.

Data

Next, we need to populate our database with data. The above schema.sql files are part of repositories that include extract and transform-load programs that will populate our data. Data is required from:

As an example, to load Nasdaq Symbol data, we clone nasdaq-symbols locally and run:

$ cd nasdaq-symbols
$ racket extract.rkt
$ racket transform-load.rkt -u <database username> -p <database password>

The extract.rkt step will retrieve the Nasdaq Symbol file and the transform-load.rkt step will insert the data into our database.

Each of the above ETL programs have their own dependencies that must be installed before you run them. For example, nasdaq-symbols requires:

$ raco pkg install --skip-installed gregor threading

Please consult the READMEs for those ETL programs for more information.

Launching Renegade Way

Now that we have set up our database and populated it with data, we can run Renegade Way. We clone renegade-way locally and run:

$ cd renegade-way
$ racket main.rkt -u <database username> -p <database password>

This should launch the application and let you run your analysis. View the README for more information.