module data.dataweb#

Short summary#

module ensae_teaching_cs.data.dataweb

Data from the web

source on GitHub

Functions#

function

truncated documentation

anyfile

Returns any file in sub folder data_web. …

google_trends

Returns some google trends example. See ensae_teaching_cs.data.dataweb.anyfile() to directly download it.

twitter_zip

Returns zipped twitter. See ensae_teaching_cs.data.dataweb.anyfile() to directly download it.

Documentation#

Data from the web

source on GitHub

ensae_teaching_cs.data.dataweb.anyfile(name, local=True, cache_folder='.', filename=True, unzip=False, encoding=None)#

Returns any file in sub folder data_web.

Paramètres:
  • name – file to download

  • local – local data or web

  • cache_folder – where to cache the data if downloaded a second time

  • filename – return the filename (True) or the content (False)

  • unzip – unzip the file

  • encoding – encoding

Renvoie:

text content (str)

source on GitHub

Returns some google trends example. See ensae_teaching_cs.data.dataweb.anyfile() to directly download it.

Paramètres:
  • name – expression

  • local – local data or web

  • cache_folder – where to cache the data if downloaded a second time

  • filename – return the filename (True) or the content (False)

Renvoie:

text content (str)

source on GitHub

ensae_teaching_cs.data.dataweb.twitter_zip(name='tweets_macron_sijetaispresident_201609', local=True, cache_folder='.', filename=False, unzip=True, as_df=True, encoding='utf-8')#

Returns zipped twitter. See ensae_teaching_cs.data.dataweb.anyfile() to directly download it.

Paramètres:
  • name – filename

  • local – local data or web

  • cache_folder – where to cache or unzip the data if downloaded a second time

  • filename – return the filename (True) or the content (False)

  • unzip – unzip the file

Renvoie:

text content (str)

source on GitHub