module data.dataweb
#
Short summary#
module ensae_teaching_cs.data.dataweb
Data from the web
Functions#
function |
truncated documentation |
---|---|
Returns any file in sub folder data_web. … |
|
Returns some google trends example. See |
|
Returns zipped twitter. See |
Documentation#
Data from the web
- 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)
- ensae_teaching_cs.data.dataweb.google_trends(name='macron', local=True, cache_folder='.', filename=True)#
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)
- 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)