Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
The Art of Data-Driven Business

You're reading from   The Art of Data-Driven Business Transform your organization into a data-driven one with the power of Python machine learning

Arrow left icon
Product type Paperback
Published in Dec 2022
Publisher Packt
ISBN-13 9781804611036
Length 314 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Alan Bernardo Palacio Alan Bernardo Palacio
Author Profile Icon Alan Bernardo Palacio
Alan Bernardo Palacio
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Preface 1. Part 1: Data Analytics and Forecasting with Python
2. Chapter 1: Analyzing and Visualizing Data with Python FREE CHAPTER 3. Chapter 2: Using Machine Learning in Business Operations 4. Part 2: Market and Customer Insights
5. Chapter 3: Finding Business Opportunities with Market Insights 6. Chapter 4: Understanding Customer Preferences with Conjoint Analysis 7. Chapter 5: Selecting the Optimal Price with Price Demand Elasticity 8. Chapter 6: Product Recommendation 9. Part 3: Operation and Pricing Optimization
10. Chapter 7: Predicting Customer Churn 11. Chapter 8: Grouping Users with Customer Segmentation 12. Chapter 9: Using Historical Markdown Data to Predict Sales 13. Chapter 10: Web Analytics Optimization 14. Chapter 11: Creating a Data-Driven Culture in Business 15. Index 16. Other Books You May Enjoy

Analyzing the performance of related queries over time

After capturing more information about the context, we can track the evolution of these queries over time. This could provide us with valuable information about local trends that have been rising in importance under our radar. We will do so using the following steps:

  1. We will select the rising queries related to bitcoin in the US:
    query_data = d_full[(d_full['source_query']=='bitcoin' )&(d_full['type']=='rising')&(d_full['geo']=='US')]
    query_data.head()

This results in the following output:

Figure 3.18: Rising queries related to bitcoin in the US

  1. We will use the top five resulting queries to track their performance in the last 12 months:
    kw_list = query_data.head()['query'].tolist() # list of keywords to get data
    # build payload
    pytrend.build_payload(kw_list, cat=0, timeframe='today 12-m')
    # Interest over...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime