Coder Social home page Coder Social logo

wsb-nps's Introduction

WSB Research - NPORT Processing Service (NPS)

https://wsb-nps.herokuapp.com/

Setup

Install:

Setup PostgreSQL

  1. Launch pgAdmin4, navigate to the browser based UI (for me it was http://127.0.0.1:19217/browser/)
  2. Connect to your local PostgreSQL server and create a new Login/User called dev with password password
  3. Create a Database called NPS, and set the owner to be the dev account you just created

Install Required Packages/Libraries

  • Run: pip install -r requirements.txt in the root of the project

Python Scraper

Running

Note: You will need to have the database setup by running python manage.py migrate from the api folder.

From the python_scraper folder run: scrapy crawl sec_nport_p

Config Options

In python_scraper/python_scraper/settings.py you can adjust how fast the spider requests pages and other spider settings.

API

Running

Currently uses the Postgres database setup earlier.

Make sure you have a dbsettings.json file created in the root api folder (right next to manage.py) with the following contents:

{
    "DB_NAME": "NPS",
    "DB_USER": "dev",
    "DB_PASSWORD": "password",
    "DB_HOST": "localhost",
    "DB_PORT": "5432"
}

You will need your own local settings file to overwrite some settings that are local specific. To use this run the following from the api folder (you might want to put the export command in a bashrc/bash_profile or you will need to run it in every new terminal session):

cp api/settings_local.py.sample api/settings_local.py
export DJANGO_SETTINGS_MODULE=api.settings_local 

To build the frontend, open a new terminal and run (to build for production you would run yarn build):

cd assets
yarn watch

From the api folder:

python manage.py migrate
python manage.py runserver

Server is now running on localhost:8000, the frontend is served at the root and there are readable docs for the api generated at /api/.

wsb-nps's People

Contributors

tshallenberger avatar nicolls1 avatar

Stargazers

 avatar  avatar

Watchers

James Cloos avatar  avatar Adrian Wydmański avatar  avatar  avatar

Forkers

nicolls1

wsb-nps's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.