Skip to content

JFBarryLi/travel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

3885710 · Jan 14, 2024

History

67 Commits
Sep 27, 2022
Oct 9, 2022
Jan 3, 2024
Jan 14, 2024
Apr 11, 2022
Sep 13, 2022
Mar 27, 2022
Sep 12, 2022
Mar 27, 2022
Mar 27, 2022
Apr 11, 2022
Oct 9, 2022
Apr 11, 2022
Oct 6, 2022
Oct 6, 2022
Sep 27, 2022

Repository files navigation

Deploy

Travel

Architecture

Data pipeline to process my daily travel journal.

Setup

Setup the following environment variables.

export ALERT_WEBHOOK="Discord webhook url for logging."
export NOTES_BUCKET_NAME="Bucket storing the notes."
export TRAVEL_TABLE="Name of the DynamoDB table to stored output."

Local Development

git clone https://github.com/JFBarryLi/travel.git
python -m venv venv
. venv/bin/activate
pip install -e .

Testing

pytest -vv

Build

docker build -t travel .

Usage

To run the entire pipeline

./scripts/notes_pipeline

nlp

from pipeline.notes.nlp import process

text = 'This is an example text.'

process(text)

BERT base sentiment analysis trained on the GoEmotions dataset - arpanghoshal/EmoRoBERTa

from pipeline.notes.nlp import predict_sentiment

text = 'This is an example text.'

predict_sentiment(text)

geo coding

from pipeline.notes.geo_code import geo_code

geo_code('Lisbon')

To deal with ambiguous geo-coding

First update geo_code_overrides.py

Then run:

./scripts/geo_code_overrides.py

Expected format for journal entries

Day 123
City_name - Thursday, February 10, 2022

Body of text. Body of text. Body of text.
Body of text.

Body of text. Body of text.

License

See LICENSE for more information.

Releases

No releases published

Packages

No packages published

Languages