Skip to content

Commit 688a07c

Browse files
authored
Update README.md
1 parent b9b39dc commit 688a07c

File tree

1 file changed

+36
-3
lines changed

1 file changed

+36
-3
lines changed

README.md

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,29 @@
11
# README
22

3-
test webhook trigger 6
3+
## Introduction
4+
5+
BookWorm is a full stack application allowing users to query bibliometric data, sourced from [OpenAlex's data snapshot](https://docs.openalex.org/download-all-data/openalex-snapshot), and provides the option of viewing the resulting data in a graph-based data visualization.
6+
7+
On opening, users are presented with a blank canvas.
8+
9+
![Image of a blank canvas on a webpage with a green bar at the top. There is a button in the left that says "Open Query Panel" and a button on the right that says "Render Visualization?" In the center is an emoji of a caterpillar and a book and it says "BookWorm"](https://github.com/user-attachments/assets/a2317195-2488-476b-b22a-fa71afb685ca)
10+
11+
In the top left corner is a button to open the "Query Panel", which utilizes GraphiQL to provide an embedded GraphQL interface for creating queries, as well as documentation for the structure of the graph.
12+
13+
![Image of the query panel open, and an example GraphQL query.](https://github.com/user-attachments/assets/1296afea-f551-42c1-81dc-923e5184929e)
14+
15+
If the query is valid and successful, the API will return a JSON object that mirrors the structure of the request.
16+
17+
![Image of the resulting JSON response from the query](https://github.com/user-attachments/assets/095f4462-41c4-45ac-ba70-f4bb3d864038)
18+
19+
On closing the query panel, users can view and interact with the generated graph visualization.
20+
21+
![Image of a graph visualization of the data, showing a yellow work in the center with teal lines going out and connecting to nodes representing authors](https://github.com/user-attachments/assets/6e2c118b-ec4f-4e9c-a4e2-aeaa4fddcae5)
22+
23+
![Another image of a query result, showing many blue or yellow nodes with article titles, connected by pink lines between them.](https://github.com/user-attachments/assets/63a52e59-0ae6-4f88-9010-0a8d5033be9e)
24+
25+
26+
This uses a [GraphQL API](https://graphql.org/learn/queries/) for the query structure.
427

528
## Production Setup
629

@@ -16,7 +39,7 @@ Quickstart:
1639

1740
## Development Setup
1841

19-
The recommended development setup is to run the rails development server and the react npm development server independently.
42+
To run a local development setup, you can run the rails development server and the react npm development server independently.
2043

2144
Requires a working installation of Postgres, npm, and bundler, and Ruby 3.2.2.
2245
- If you do not have a ruby version manager, I recommend `rbenv`.
@@ -44,7 +67,7 @@ In the `/react` folder:
4467

4568
### Automated Tests
4669

47-
This repository uses RSpec for testing the rails application.
70+
This repository uses RSpec for testing the rails application. (These need to be reworked as they haven't been maintained in recent changes).
4871

4972
In the `/rails` folder:
5073
- Run `rspec` to run all of the rspec tests, or `rspec spec/path/to/*_spec.rb` to run a specific test.
@@ -54,3 +77,13 @@ Coverage reports are generated using [simplecov](https://github.com/simplecov-ru
5477
The test suite is configured to use [vcr](https://github.com/vcr/vcr) for tests that interact with any external APIs, primarily the OpenAlex API. If you encounter errors related to `vcr` while running tests, try deleting the recorded 'cassette' files in `spec/fixtures/vcr_cassettes/` and running `rspec` again to re-record them.
5578

5679
Planning on trying Jest for testing front end. WIP.
80+
81+
## Data Source
82+
83+
Data is sourced from [OpenAlex's data snapshot](https://docs.openalex.org/download-all-data/openalex-snapshot), which also provides information about the structure of the source data and some basic instructions for uploading to a relational database, such as the Postgres database used in BookWorm.
84+
85+
There are rake tasks in `/rails/lib/tasks/` for reading from CSV files to the database - this process could be optimized by running rake tasks in parallel or making adjustments to the insertion batch sizes in each file.
86+
87+
## Data Visualization
88+
89+
The data visualization is generated using a combination of [React Flow](https://reactflow.dev/) for rendering nodes and edges, and [D3](https://d3js.org/) for calculating node positions.

0 commit comments

Comments
 (0)