Skip to content

Commit

Permalink
Update README to account for v2
Browse files Browse the repository at this point in the history
Closes #32
  • Loading branch information
brianlove committed Aug 28, 2023
1 parent 3c50829 commit 10cb68f
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 13 deletions.
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
### 🦜 PARAT: CSET's Private-sector AI-Related Activity Tracker
# 🦜 PARAT: CSET's Private-sector AI-Related Activity Tracker

This repository contains the code that generates [PARAT](https://parat.cset.tech).

[company_linkage](/company_linkage) contains the code that generates the data behind PARAT:
* [company_linkage](/company_linkage) contains the code that generates the data behind PARAT:
company resolution across datasets, publication counts, etc.

[web](/web) contains the code that generates the PARAT website from the company_linkage data.
* [web](/web) contains the code that generates the PARAT website from the company_linkage data.


## Setup

The project python dependencies are listed in `requirements.txt`. Before running code in this repo:

1.) Make a new virtualenv:
1. Make a new virtualenv:

```bash
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
```

2.) `export GOOGLE_APPLICATION_CREDENTIALS=<path to your credentials>` - a service account json. You should have at
2. `export GOOGLE_APPLICATION_CREDENTIALS=<path to your credentials>` - a service account json. You should have at``
least BQ reader permissions, if you are a CSET user. If you are not a CSET user, then you will not be able to
run some of this code as-is, since it depends on our internal BigQuery datasets. Please contact us if you are
interested in collaborating or spot any issues.
interested in collaborating or spot any issues.

3. [Install and run the web interface](/web/README.md#web-interface)

25 changes: 18 additions & 7 deletions web/README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,41 @@
### Web artifacts and data preprocessing code for PARAT
# Web artifacts and data preprocessing code for PARAT

This directory contains the code that processes the data generated in [company_linkage](../company_linkage) for use in the PARAT website.
It also contains a Gatsby project that contains the PARAT website generation code.

## Data updates

To update the text that is used in the various explanatory tabs, edit the markdown files in `raw_data/text/`.
To update the tooltips, edit `src/static_data/tooltips.js`.

To populate the necessary data from a raw clone of this repository, run:

1.) `python3 scripts/mk_tab_text.py`. This will read the markdown text files in `raw_data/text` and output them
1. `python3 scripts/mk_tab_text.py`. This will read the markdown text files in `raw_data/text` and output them
as a javascript object containing html snippets in `src/static_data/text.js`.

2.) Grab the raw data and reformat it into a javascript object. You will need a service account with translation
2. Grab the raw data and reformat it into a javascript object. You will need a service account with translation
and BigQuery reader permissions. To fully regenerate everything including images and Google Finance links
(which take ~1.5 hours to generate), run:
`python3 scripts/retrieve_data.py --refresh_raw --refresh_images --refresh_market_links`. Run
`python3 scripts/retrieve_data.py -h` for more detail on what these parameters do.

Next, to run the site in development mode, do:

## Web interface

The new (v2) interface for PARAT is in the `gui-v2/` directory.

### Development server
To start the development server:

```bash
cd parat
gatsby develop
cd gui-v2/
npm install
npm run develop
```

You should be able to view the site at `localhost:8000`.
The PARAT v2 interface will be available at `localhost:8550`.

### Deploying release

When any changes are ready for deployment, do:

Expand Down

0 comments on commit 10cb68f

Please sign in to comment.