-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
30 lines (24 loc) · 1.23 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from src.parse_csv_files import clean_kwds_score_relative_each_other_file, \
merge_scores_for_keyword_files
from src.scrape_gtrends import scrape_gtrends
# -----------------------------------------------------------------------------
# User inputs
# -----------------------------------------------------------------------------
keywords = ["bitcoin", "ethereum", "tether", "solana", "dogecoin"]
start_date = "2024-04-09"
end_date = "2024-05-09"
geo = "GB"
csv_directory_location = '/home/xxxxx/xxxxx/GoogleTrends/Data_Output'
# -----------------------------------------------------------------------------
# Scraping Google trends and downloading csv files
# -----------------------------------------------------------------------------
scrape_gtrends(keywords = keywords,
start_date = start_date,
end_date = end_date,
geo = geo,
csv_directory_location = csv_directory_location)
# -----------------------------------------------------------------------------
# Cleaning and merging csv files
# -----------------------------------------------------------------------------
merge_scores_for_keyword_files(keywords = keywords)
clean_kwds_score_relative_each_other_file(keywords = keywords)