PortCoAugmentationWorker 0.1.0
A program to extract portfolio company names and retrieve information using People Data Labs API.
Requires Python: >=3.6

# PortCo Augmentation Worker

## Overview

The PortCo Augmentation Worker is a program that aims to speed up the process of both extracting portfolio company names from quarterly statements and retrieving information about those extracted portfolio companies.

## Files

- worker_main.py
  - This is the file that contains the majority of the code for this program. This file handles most of the API calls and program functionality.

- table_helper.py
  - This file serves to assist the main file with the `display_table()` function. This file handles the code that displays the table with all of the entries from our PortCo database.

- search.py
  - This file handles the code for the functionality of the program to allow the user to specify additional parameters when searching for a company using the People Data Labs API.

## Requirements

- All of the required libraries for this program to run can be found within the `requirements.txt` file.
- In order to install all of the required libraries for this project, run the following line of code in your console:
  - ```pip install -r requirements.txt```

## Instructions

- When running the program, a dialog box will come up that gives you six options to select from:
  - Quick Upload
    - This option will prompt the user to upload a pdf file of a quarterly financial statement for a fund and subsequently extract the names of the portfolio companies from that pdf and attempt to find them in the People Data Labs database, then add them to Gridline's SQL database.
  - Precise Upload
    - This option will prompt the user to upload a pdf file of a quarterly finanfical statement for a fund and subsquently extract the names of the portfolio companies from that pdf. It will then go through the company names 1 by 1 and ask the user if they would like to modify or add additional parameters to the search to ensure more accurate results when making calls to the People Data Labs API. It will then take the data returned from the People Data Labs database and add it to Gridline's SQL Database
  - Update All
    - This option will go through Gridline's database of portfolio companies and send a new API call to the People Data Labs API for each of the companies. It will then update the data accordingly.
  - Update One
    - This option allows the user to select one specific company to update that already exists in Gridline's database. The user inputs the company ID, and then a new call will be made to the People Data Labs  API and the entry will be updated accordingly.
  - Custom Search
    - This option will allow the user to add one company or update one entry already in the Gridline database using specific and custom parameters passed into the People Data Labs API call.
  - View Portfolio Companies
    - This option will display an interactive table returning all of the portfolio companies that are currently in the Gridline database. This will provide the user with an easy way to view the data without connecting to the SQL database.

## Display Navigation
- The interactive table display is built for user-friendliness. This guide details the different bindings and features available within the interface.
  - **Sorting**: Click on column headers to sort the data in ascending or descending order
  - **Row Details**: Double click on any row to view the full row information
    - Press the 'Up' arrow key to display the row above, or the 'Down' arrow key to display the row below
  - **Cell Details**: Ctrl/Cmd click on any cell to view its specific information
  - **Search Bar**: Type a query and click the `Search` button, or press 'Enter' key to filter the data
    - Any query matches will appear bolded in row and cell popups of search results
  - **Clear Search**: Click the `Clear Search` button, or delete query and enter, to reset the search filter
  - **Analysis Options**: Select one or more analysis options using the checkboxes and click the `Analyze` button for popup results
  - **Exit popup**: Click the `Close` button, or press 'Esc' key to close any popup
  - **Drag & Drop**: In the main window, click and drag a row on top of another row to compare the underlying holding stake, underlying holding stake value, and total amount raised of the two rows
    - The popup also displays the portCoId, company name, and fund name from each row