Skip to content

brianSalk/sql_or_sequal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sql_or_sequal

a simple web scraping script to investigate how redditors pronounce SQL.

This script uses the praw module to create a reddit scraper that searches submissions and comments for the word SQL proceeded by either 'a' or 'an'. If people are saying 'a SQL', we can assume they are pronouncing the word 'sequal'. If on the other hand, they are typing 'an SQL', we assume they are saying 'a ESS-QUE-EL'.

How to use this script

0) make sure that you have praw, scipy and matplotlib installed (unless you are installing via docker)

pip install praw scipy matplotlib

1) clone this repo to your computer.

git clone https://github.com/brianSalk/sql_or_sequal

2) create a reddit account if you do not already have one
3) create a reddit app make sure you check the option for script
4) in your cloned repository, create a new folder called cridentials.py.

touch credentials.py

5) Using the information from the reddit.com/prefs/apps, create the following 5 variables and store them in credentials.py

client_secret="asdfkajsldfkjasj83j823j" # located after word "secret"
client_id="29829383983f9h2389fh2398fh2" # located right under app name
usename="me123" # your reddit user name
password="secret12" # your reddit password
useragent="blahblah" # set equal to any string

This picture shows you where the client_id and client_secret are.

Usage

view complete list of valid command line arguments along with breif summary of usage:

python sql_or_sequal.py -h

search 300 submissions in r/sql and r/programminghumor, also print a chart of the data

python sql_or_sequal.py -s 'sql+programminghumor' -l 300 --chart

Contribute

If you are looking for some low-hanging fruit contributions to make here is how you can help
1) provide additional documentation/comments for this code
2) do some kind of analysis using this project (be creative!)
3) set up a docker file to allow this program to run on windows.

About

A reddit scrapper investigating how redditors pronounce SQL

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published