from pytrends.request import TrendReq

google_username = "mm.trends.api@gmail.com"
google_password = ""
path = ""

# connect to Google
pytrend = TrendReq(google_username, google_password, custom_useragent='Pytrends')

trend_payload = {'q': 'Pizza, Italian, Spaghetti, Breadsticks, Sausage', 'cat': '0-71'}

# trend
trend = pytrend.trend(trend_payload)
print(trend)
df = pytrend.trend(trend_payload, return_type='dataframe')

df

# toprelated
toprelated = pytrend.related(trend_payload, related_type='top')
print(toprelated)
risingrelated = pytrend.related(trend_payload, related_type='rising')
print(risingrelated)

# top30in30
top30in30 = pytrend.top30in30()
print(top30in30)

country_payload = {'geo': 'US'}
# hottrends
hottrends = pytrend.hottrends(country_payload)
print(hottrends)

# hottrendsdetail
# returns XML data
hottrendsdetail = pytrend.hottrendsdetail(country_payload)
print(hottrendsdetail)

payload = {'date': '201601', 'geo': 'US'}
# alltopcharts
topcharts = pytrend.topcharts(payload)
print(topcharts)

keyword = 'pizza'
# suggestions
suggestions = pytrend.suggestions(keyword)
print(suggestions)

"""
Explanation: We want:
- stock prices for several companies from various sectors, daily data over many years
- main index, daily data over many years
- sector information for every one of those companies
- google domestic trends data hardest to get - either all, or the most important, of indicators, daily, for the entire period. Query 4 months at a time to obtain daily data (otherwise it's monthly - according to pytrends documentation)

make a google account for the purpose of getting google d trends.
End of explanation
"""


gt = pd.read_table?

gt = pd.read_clipboard(index_col)

gt

"""
Explanation: GOOGLEINDEX_US:ADVERT
This Google Advertising & Marketing Index tracks searches related to (marketing, advertising, commercials...)


GOOGLEINDEX_US:AIRTVL
This Google Air Travel Index tracks searches related to (airlines, airline, flights...)


GOOGLEINDEX_US:AUTOBY
This Google Auto Buyers Index tracks searches related to (car, blue book...)


GOOGLEINDEX_US:AUTOFI
This Google Auto Financing Index tracks searches related to (loan, car lean...)


GOOGLEINDEX_US:AUTO
This Google Automotive Index tracks searches related to (car, honda, toyota...)


GOOGLEINDEX_US:PERFIN
This Google Personal Finance Index tracks searches related to (bank, bank of america...)


GOOGLEINDEX_US:BIZ
This Google Business Index tracks searches related to (calendar, business, salary...)


GOOGLEINDEX_US:COMPUT
This Google Computers & Electronics Index tracks searches related to (windows, download, microsoft...)


GOOGLEINDEX_US:CONSTR
This Google Construction Index tracks searches related to (doors, construction...)


GOOGLEINDEX_US:CREDIT
This Google Credit & Lending Index tracks searches related to (credit, credit card, loans...)


GOOGLEINDEX_US:DURBLE
This Google Durable Goods Index tracks searches related to (vacuum, appliances, refrigerator...)


GOOGLEINDEX_US:FININS
This Google Finance & Insurance Index tracks searches related to (stock, bank, yahoo...)


GOOGLEINDEX_US:FURNTR
This Google Furniture Index tracks searches related to (ikea, furniture, table...)


GOOGLEINDEX_US:INDUST
This Google Industries Index tracks searches related to (home, energy, usps...)


GOOGLEINDEX_US:INVEST
This Google Investing Index tracks searches related to (finance, stocks, capital, stock...)


GOOGLEINDEX_US:JOBS
This Google Jobs Index tracks searches related to (city, jobs, resume, monster...)


GOOGLEINDEX_US:LUXURY
This Google Luxuries Index tracks searches related to (diamond, jewelers, rings, tiffany...)


GOOGLEINDEX_US:MTGE
This Google Mortgage Index tracks searches related to (mortgage calculator, mortage rates, mortgage...)


GOOGLEINDEX_US:RLEST
This Google Real Estate Index tracks searches related to (mortgage,apartmenents, real estate, rent...)


GOOGLEINDEX_US:RENTAL
This Google Rental Index tracks searches related to (for rent, rent, rentals...)


GOOGLEINDEX_US:RETAIL
This Google Retail Index tracks searches related to (bags, vending, retail...)


GOOGLEINDEX_US:TRAVEL
This Google Travel Index tracks searches related to (hotel, vegas, airlines...)


GOOGLEINDEX_US:UNEMPL
This Google Unemployment Index tracks searches related to (social security, unemployment...)
End of explanation
"""


