Skip to content

Commit 48db0d2

Browse files
committed
- Add setup instructions to the README
- Remove prerequisites section, since this is now captured by requirements.txt
1 parent 7291e51 commit 48db0d2

File tree

1 file changed

+22
-23
lines changed

1 file changed

+22
-23
lines changed

README.md

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,22 @@ Sentiment analysis is performed on the comment text using the 'nltk' (Natural
1515
Language Toolkit) python library. This data is added to the database entries of
1616
each comment.
1717

18+
## Setup Instructions
19+
1. Install `python3`
20+
2. Create your python virtual environment with `python3 -m venv <env name>`
21+
3. Install the packages in the `src/requirements.txt` file to your virtual
22+
environment with `pip install -r requirements.txt`.
23+
4. Create a file in the `/src` directory called `.env`. This file should contain
24+
The following values:
25+
```
26+
API_KEY=<key> # your YouTube Data API key
27+
DB_FILE=<filename> # the database file to which collected data will be written
28+
LOG_LEVEL=[debug|info|warn|error]
29+
```
30+
For information about how to create an API key, see [here](https://blog.hubspot.com/website/how-to-get-youtube-api-key).
31+
5. Run the tool with `python astro.py <YouTube video URL>` to start collecting
32+
data. You can see output from an example run in the next section.
33+
1834
## Example
1935
This output below was generated by providing the video ID string of a relatively
2036
small YouTube channel.
@@ -34,31 +50,14 @@ DEBUG:astro.py:main: Collected data preview:
3450
3551
## Background
3652
YouTube has been a primary source of information and entertainment in my house
37-
for years now. Recently when looking at the comments of various videos, I've
38-
noticed what I feel is strange behavior. However, I am not someone who regularly
39-
engages with social media in that way, so this project is my attempt to
40-
investigate and understand the behavior I see online.
53+
for years. I've found that when reading comments on YouTube videos, I'm often
54+
perplexed by the content there. Wanting to understand this behavior, whether it
55+
was the product of real users or bots, I started researching social media usage.
56+
This project is my attempt to gather data from YouTube videos and their comments
57+
in order to analyze trends in the data, if any, in an effort to better
58+
understand YouTube commenting behavior and its impact on video performance.
4159
4260
The name 'Astro' was chosen as a short form of 'Astroturf', a term used to
4361
describe artificial social movements, since I was initially working toward
4462
identifying bot campaigns. I've since decided to restrict the scope of the
4563
project (at least for now), since that goal will require much more research.
46-
47-
## Prerequisites
48-
These packages are required in order to run this tool.
49-
50-
- YouTube Data API
51-
Used for accessing YouTube data. Install with:
52-
`pip install google-api-python-client`
53-
54-
- dotenv
55-
Used for loading environment variables from a local .env file. Install with:
56-
`pip insatll python-dotenv`
57-
58-
- pandas
59-
Used for capturing YouTube data in dataframes (for now). Install with:
60-
`pip install pandas`
61-
62-
- Natural Language Toolkit
63-
Used for sentiment analysis of comments. Install with:
64-
`pip insatll nltk`

0 commit comments

Comments
 (0)