Skip to main content

Download long-term Google Trends

Project description

longtrends

A package to download long-term Google Trends.

Introduction

Google Trends, downloadable by API using pytrends, limits the time period which can be downloaded using a single request. Each request is scaled between 0 and 100, making comparison between different time periods difficult. This package automatically downloads overlapping trends and rescales them, providing trend data across a long-term period.

Installation

pip install longtrends

Requirements

Requires pytrends, installed automatically with pip.

Usage

from longtrends import rescale_overlaps, trends_plot, get_overlapping_trends
from datetime import datetime

# Get overlapping trends
olympics = get_overlapping_trends(
                                keyword='olympics',
                                start_date=datetime(2021, 7, 4),
                                end_date=datetime(2021, 8, 29),
                                days_delta=10)

# Plot overlapping trends
trends_plot(olympics)

# Rescale overlaps
olympics_rescaled = rescale_overlaps(olympics)

# Plot rescaled trends
trends_plot(olympics_rescaled)

Disclaimer

This is not an official or supported product. It is provided without warranty under MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

longtrends-0.3.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

longtrends-0.3-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file longtrends-0.3.tar.gz.

File metadata

  • Download URL: longtrends-0.3.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.13

File hashes

Hashes for longtrends-0.3.tar.gz
Algorithm Hash digest
SHA256 721572a7aeb5b2cdd9a02fd5df12bd93a9330fc8bdfeb769259719459d17fac7
MD5 54ed8c087d0e202cf8fe45e98daad24d
BLAKE2b-256 1a1fca2cfd9a8efe932b3e82c6dea2c9adf4b64e0a8d12a8d0860d6335ed89ac

See more details on using hashes here.

File details

Details for the file longtrends-0.3-py3-none-any.whl.

File metadata

  • Download URL: longtrends-0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.13

File hashes

Hashes for longtrends-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b6aaf3f50123e3ca595542e38c16612f711a44fa3c3133e74220241bafaf7b01
MD5 727c398289a4878f0dc38eb19cabf14b
BLAKE2b-256 8718ab7e065414baf906c8caef8239b15f43113080c6a7198f38ae653daf1cd2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page