{
"info": {
"author": "Andreas Pirchner",
"author_email": "andreas.pirchner1990@gmail.com",
"bugtrack_url": null,
"classifiers": [],
"description": ".. image:: https://travis-ci.com/APirchner/gsvi.svg?branch=master\n :target: https://travis-ci.com/APirchner/gsvi\n\n.. image:: https://img.shields.io/pypi/dm/gsvi\n :target: https://pypi.python.org/pypi/gsvi\n\nGSVI - Google Search Volume Index\n*********************************\n\nA interface for the `Google Trends `_ time-series widget.\n\nMotivation\n==========\nThe Google Search Volume Index (GSVI) is a useful metric for the\nattention a certain topic (product, event etc.) receives.\nFetching data from Google Trends automatically can be a pain.\nThis package makes getting arbitrary-length time-series of monthly, daily and hourly data as easy as::\n\n connection = GoogleConnection()\n series = SVSeries.univariate(connection=connection,\n query={'key': 'sp500', 'geo': 'US'},\n start=start, end=end,\n category=CategoryCodes.FINANCE,\n granularity='DAY'\n )\n ts = series.get_data()\n\n\nIdea\n====\nGoogle Trends' quota limits are a big factor slowing down the collection of data.\nPacking requests tightly reduced the load on GT and pushes the limits\non data one can pull before getting kicked -\nthis package bundles up to queries into one request.\nAnother weird quirks of Google Trends are the data normalization and granularity.\nGT reports daily data for queries with an interval length between 1 and 269 days,\nhourly data between 3 and 7 days and\nmonthly data from 1890 days on (NOTE: this could change at any time!).\nFor each request, the volume within one request is normalized to have a maximal value of 100.\nSo the query for the daily/hourly search volume for keyword abc in some interval, is handled by *gsvi* as follows:\n\n #. Bundle the query into requests of max. 5 269-day (7-day for hourly) fragments each and\n get the SV from Google Trends. If this is sufficient to cover the whole interval, skip the next steps.\n #. Look for the query holding the maximum (100) in each request.\n #. Bundle the fragments holding the maxima into requests of 5 each and get the SV from Google Trends.\n #. Repeat 2.-3. until only one interval holding the global maximum is left\n #. Bundle the original query into requests of 4 269-day (7-day) fragments +\n fragment with global maximum get the SV from Google Trends.\n \nThis procedure results in a continuous series that is normalized to\n\\[0, 100\\] over the global maximum by Google Trends itself.\nFor monthly data, one request per key is sufficient.\n\nThis idea naturally extends to multivariate series of up to n queries,\nlimited only by what GT allows you to pull.\n\n\nUsage\n=====\nFor example, we would like to get the daily search volume for 'food' in the\nU.S. from 2014-09-13 to 2019-06-13::\n\n import datetime as dt\n from gsvi.connection import GoogleConnection\n from gsvi.timeseries import SVSeries\n\n # series start and end\n start = dt.datetime(year=2014, month=9, day=13)\n end = dt.datetime(year=2019, month=6, day=13)\n\n # make connection to Google Trends and inject connection into the request structure\n connection = GoogleConnection()\n series = SVSeries.univariate(connection=connection,\n query={'key': 'food', 'geo': 'US'},\n start=start, end=end, granularity='DAY'\n )\n ts = series.get_data()\n\nOr, what about the monthly volume of car brand searches in Germany from 2004 to June 2019::\n\n import datetime as dt\n\n from gsvi.connection import GoogleConnection\n from gsvi.timeseries import SVSeries\n\n # series start and end\n start = dt.datetime(year=2014, month=9, day=13)\n end = dt.datetime(year=2019, month=6, day=13)\n\n # make connection to Google Trends and inject connection into the request structure\n connection = GoogleConnection()\n query_multi = [{'key': 'mercedes', 'geo': 'DE'},\n {'key': 'porsche', 'geo': 'DE'},\n {'key': 'bmw', 'geo': 'DE'},\n {'key': 'audi', 'geo': 'DE'},\n {'key': 'vw', 'geo': 'DE'},\n {'key': 'ford', 'geo': 'DE'},\n ]\n start_multi = dt.datetime(year=2004, month=1, day=1)\n end_multi = dt.datetime(year=2019, month=6, day=1)\n series = SVSeries.multivariate(connection=connection,\n queries=query_multi,\n start=start, end=end,\n granularity='MONTH'\n )\n ts = series.get_data()\n\n\n\nInstallation\n============\n\n::\n\n$ pip install gsvi\n\n\nCredits\n=======\n\n- The main idea for the normalization was taken from a paper by `Christopher Fink and Thomas Johann (2014) `_\n- The connection-handling was inspired by the `pytrends package `_",
"description_content_type": "text/markdown",
"docs_url": null,
"download_url": "https://github.com/APirchner/gsvi/archive/v0.2.1.tar.gz",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/APirchner/gsvi",
"keywords": "Google Trends,search volume,google search volume",
"license": "MIT",
"maintainer": "",
"maintainer_email": "",
"name": "gsvi",
"package_url": "https://pypi.org/project/gsvi/",
"platform": "",
"project_url": "https://pypi.org/project/gsvi/",
"project_urls": {
"Download": "https://github.com/APirchner/gsvi/archive/v0.2.1.tar.gz",
"Homepage": "https://github.com/APirchner/gsvi"
},
"release_url": "https://pypi.org/project/gsvi/0.2.2/",
"requires_dist": null,
"requires_python": ">=3.7",
"summary": "Interface for the Google Trends time-series widget",
"version": "0.2.2",
"yanked": false,
"yanked_reason": null
},
"last_serial": 9989262,
"releases": {
"0.1": [
{
"comment_text": "",
"digests": {
"md5": "9b531e81a36d823e9a3ea7cea906d69e",
"sha256": "6159d160b944212c70b48fd9741a9bff8170881cc4985be9379ea5239605c2ca"
},
"downloads": -1,
"filename": "gsvi-0.1.tar.gz",
"has_sig": false,
"md5_digest": "9b531e81a36d823e9a3ea7cea906d69e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 10675,
"upload_time": "2019-10-30T07:54:47",
"upload_time_iso_8601": "2019-10-30T07:54:47.845901Z",
"url": "https://files.pythonhosted.org/packages/66/7f/2534bcc0daf7807509863322b0624d8faaf6bcfccc0687a8fda93d0ab3b3/gsvi-0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"0.2": [
{
"comment_text": "",
"digests": {
"md5": "2bf607c6d2a15f9a4cd2d1c5b52c4e83",
"sha256": "fe6a16c5e58217e378b09e105f0509fb6bdd2ae5dd846732e91ed1bb4b664351"
},
"downloads": -1,
"filename": "gsvi-0.2.tar.gz",
"has_sig": false,
"md5_digest": "2bf607c6d2a15f9a4cd2d1c5b52c4e83",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 11761,
"upload_time": "2020-01-30T12:47:22",
"upload_time_iso_8601": "2020-01-30T12:47:22.311802Z",
"url": "https://files.pythonhosted.org/packages/24/70/96d325508c01be6db0d5e03e0f7d7fc7fbe1ebbbfe06a19d04c10e93f5a9/gsvi-0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"0.2.1": [
{
"comment_text": "",
"digests": {
"md5": "0544d99fb8ca85298d85a13458f3ffcf",
"sha256": "03a83c7ce6640b36b677eb834d95af7aff441733a2b7f943ff25235e0e52b48c"
},
"downloads": -1,
"filename": "gsvi-0.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0544d99fb8ca85298d85a13458f3ffcf",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 13640,
"upload_time": "2021-02-14T12:26:19",
"upload_time_iso_8601": "2021-02-14T12:26:19.519823Z",
"url": "https://files.pythonhosted.org/packages/df/b4/d1529a9071eff50809edecd2cb0401d5cbb3a1d817476ecdce1e92daacd8/gsvi-0.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "003e96f71dcb0a8c3d5e92401619a719",
"sha256": "ae0d5b55ce4d76ed3b98963c08cbd9ee4e8ee0b00c231fbef9bfda991b54d10f"
},
"downloads": -1,
"filename": "gsvi-0.2.1.tar.gz",
"has_sig": false,
"md5_digest": "003e96f71dcb0a8c3d5e92401619a719",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 12344,
"upload_time": "2021-02-14T12:26:20",
"upload_time_iso_8601": "2021-02-14T12:26:20.939170Z",
"url": "https://files.pythonhosted.org/packages/4a/50/1832e413e84bfd36ec57ede49ee8cbd64213000a2cb18ddba334c6b13148/gsvi-0.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"0.2.2": [
{
"comment_text": "",
"digests": {
"md5": "dc2c4eb412ffa206a4cfc0459be06029",
"sha256": "1e7a95fc471ac119fff9157c6e7ade9dfcd69899817a503ac72539d54877509c"
},
"downloads": -1,
"filename": "gsvi-0.2.2.tar.gz",
"has_sig": false,
"md5_digest": "dc2c4eb412ffa206a4cfc0459be06029",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 12441,
"upload_time": "2021-04-06T19:12:17",
"upload_time_iso_8601": "2021-04-06T19:12:17.606195Z",
"url": "https://files.pythonhosted.org/packages/98/b1/21f4a26d5f5235799c5196c2fded526130e13ab08a9dbfabbcae7086e1de/gsvi-0.2.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "dc2c4eb412ffa206a4cfc0459be06029",
"sha256": "1e7a95fc471ac119fff9157c6e7ade9dfcd69899817a503ac72539d54877509c"
},
"downloads": -1,
"filename": "gsvi-0.2.2.tar.gz",
"has_sig": false,
"md5_digest": "dc2c4eb412ffa206a4cfc0459be06029",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 12441,
"upload_time": "2021-04-06T19:12:17",
"upload_time_iso_8601": "2021-04-06T19:12:17.606195Z",
"url": "https://files.pythonhosted.org/packages/98/b1/21f4a26d5f5235799c5196c2fded526130e13ab08a9dbfabbcae7086e1de/gsvi-0.2.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"vulnerabilities": []
}