Using Title Keywords for Visual Exploration of Academic Citation Networks (George's Thesis 2020-2021)
This is an experimental layout intended to help researchers tell better stories of new topics areas they would like to explore, to aid understanding and discovery of related works.
- Create a Python virtual environment:
virtualenv -p python3 env- Activate the virtual environment:
(The script in env/bin that you run may vary depending on your shell. For sh/bash:)
source env/bin/activate- Install Python requirements:
pip install -r requirements.txt- Set up React and dependencies for the website:
cd app
yarn installNow you're all set to develop!
Just run:
./run.shUsage logs by date will appear in logs/.
- Deploy the backend server in
app.py.
The quickest (but sloppy) way to do this is to serve it with Flask. This is how it's currently served from the research site at https://papermaps.me. To serve with flask, just run:
FLASK_ENV=development flask runThis will host the backend server at localhost:5000. The research site is set up with nginx to proxy queries from
https://papermaps.me/api to localhost:5000.
A better way to do this would be to modify app.py to be deployed as USGI or ASGI and use something like uvicorn to
serve it, which will provide production-quality hosting, notably multiple workers instead of the single-threaded debug
mode provided by flask run.
- Build the production version of the website:
First, modify src/constants/Values.js so that API_URL points to the proper location. In development, it should be
localhost:5000, but in production, it should be /api.
Then compile the app:
cd app
makeThe compiled website will now be in app/build.
- Serve
build/as a single-page-app.
For https://papermaps.me, this is accomplished using nginx to serve the build/ directory as an
SPA. This is done by just routing all queries to / and all 404 errors to build/index.html.
- Cleaner layout when there are many keywords
- Indexing and visualizing keywords in abstracts
- Quality-of-life tools, such as paper viewing history, and marking papers as read.
app/: The React website.
app/build: Compiled website, ready for deployment to productionapp/src: React Source Code for the websiteapp/src/assets: Website CSSapp/src/components: Common modular components employed in the siteapp/src/constants: Site-wide parameters.app/src/pages: Pages of the websiteapp/src/utils: Common utilities and helpers used across the siteapp/src/App.js: Main React entrypoint.app/Makefile: Makefile used to build the React app for production.
logs: Usage logs for analysis in post.
app.py: The backend server, which handles paper retrieval and provides an LP solver.
run.sh: Script to run the backend server and serve the React website, both in development mode.
George Moe can be contacted after graduation at george@george.moe.