Bugfixes in data

This commit is contained in:
Petrônio Cândido 2018-09-06 15:31:45 -03:00
parent 161cc6b1e5
commit 033dc2807a
16 changed files with 61 additions and 39 deletions

Binary file not shown.

Binary file not shown.

View File

@ -75,15 +75,15 @@
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<div class="viewcode-block" id="get_data"><a class="viewcode-back" href="../../../pyFTS.data.html#pyFTS.data.Bitcoin.get_data">[docs]</a><span class="k">def</span> <span class="nf">get_data</span><span class="p">():</span>
<div class="viewcode-block" id="get_data"><a class="viewcode-back" href="../../../pyFTS.data.html#pyFTS.data.Bitcoin.get_data">[docs]</a><span class="k">def</span> <span class="nf">get_data</span><span class="p">(</span><span class="n">field</span><span class="o">=</span><span class="s1">&#39;avg&#39;</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Get the univariate time series data.</span>
<span class="sd"> :param field: dataset field to load</span>
<span class="sd"> :return: numpy array</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">dat</span> <span class="o">=</span> <span class="n">get_dataframe</span><span class="p">()</span>
<span class="k">return</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">dat</span><span class="p">[</span><span class="s2">&quot;Avg&quot;</span><span class="p">])</span></div>
<span class="k">return</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">dat</span><span class="p">[</span><span class="n">field</span><span class="p">])</span></div>
<div class="viewcode-block" id="get_dataframe"><a class="viewcode-back" href="../../../pyFTS.data.html#pyFTS.data.Bitcoin.get_dataframe">[docs]</a><span class="k">def</span> <span class="nf">get_dataframe</span><span class="p">():</span>
<span class="sd">&quot;&quot;&quot;</span>

View File

@ -75,14 +75,15 @@
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<div class="viewcode-block" id="get_data"><a class="viewcode-back" href="../../../pyFTS.data.html#pyFTS.data.DowJones.get_data">[docs]</a><span class="k">def</span> <span class="nf">get_data</span><span class="p">():</span>
<div class="viewcode-block" id="get_data"><a class="viewcode-back" href="../../../pyFTS.data.html#pyFTS.data.DowJones.get_data">[docs]</a><span class="k">def</span> <span class="nf">get_data</span><span class="p">(</span><span class="n">field</span><span class="o">=</span><span class="s1">&#39;avg&#39;</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Get the univariate time series data.</span>
<span class="sd"> :param field: dataset field to load</span>
<span class="sd"> :return: numpy array</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">dat</span> <span class="o">=</span> <span class="n">get_dataframe</span><span class="p">()</span>
<span class="k">return</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">dat</span><span class="p">[</span><span class="s2">&quot;Avg&quot;</span><span class="p">])</span></div>
<span class="k">return</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">dat</span><span class="p">[</span><span class="n">field</span><span class="p">])</span></div>
<div class="viewcode-block" id="get_dataframe"><a class="viewcode-back" href="../../../pyFTS.data.html#pyFTS.data.DowJones.get_dataframe">[docs]</a><span class="k">def</span> <span class="nf">get_dataframe</span><span class="p">():</span>

View File

@ -73,14 +73,15 @@
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<div class="viewcode-block" id="get_data"><a class="viewcode-back" href="../../../pyFTS.data.html#pyFTS.data.EURGBP.get_data">[docs]</a><span class="k">def</span> <span class="nf">get_data</span><span class="p">():</span>
<div class="viewcode-block" id="get_data"><a class="viewcode-back" href="../../../pyFTS.data.html#pyFTS.data.EURGBP.get_data">[docs]</a><span class="k">def</span> <span class="nf">get_data</span><span class="p">(</span><span class="n">field</span><span class="o">=</span><span class="s1">&#39;avg&#39;</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Get the univariate time series data.</span>
<span class="sd"> :param field: dataset field to load</span>
<span class="sd"> :return: numpy array</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">dat</span> <span class="o">=</span> <span class="n">get_dataframe</span><span class="p">()</span>
<span class="k">return</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">dat</span><span class="p">[</span><span class="s2">&quot;Avg&quot;</span><span class="p">])</span></div>
<span class="k">return</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">dat</span><span class="p">[</span><span class="n">field</span><span class="p">])</span></div>
<div class="viewcode-block" id="get_dataframe"><a class="viewcode-back" href="../../../pyFTS.data.html#pyFTS.data.EURGBP.get_dataframe">[docs]</a><span class="k">def</span> <span class="nf">get_dataframe</span><span class="p">():</span>

View File

@ -73,14 +73,15 @@
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<div class="viewcode-block" id="get_data"><a class="viewcode-back" href="../../../pyFTS.data.html#pyFTS.data.EURUSD.get_data">[docs]</a><span class="k">def</span> <span class="nf">get_data</span><span class="p">():</span>
<div class="viewcode-block" id="get_data"><a class="viewcode-back" href="../../../pyFTS.data.html#pyFTS.data.EURUSD.get_data">[docs]</a><span class="k">def</span> <span class="nf">get_data</span><span class="p">(</span><span class="n">field</span><span class="o">=</span><span class="s1">&#39;avg&#39;</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Get the univariate time series data.</span>
<span class="sd"> :param field: dataset field to load</span>
<span class="sd"> :return: numpy array</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">dat</span> <span class="o">=</span> <span class="n">get_dataframe</span><span class="p">()</span>
<span class="k">return</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">dat</span><span class="p">[</span><span class="s2">&quot;Avg&quot;</span><span class="p">])</span></div>
<span class="k">return</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">dat</span><span class="p">[</span><span class="n">field</span><span class="p">])</span></div>
<div class="viewcode-block" id="get_dataframe"><a class="viewcode-back" href="../../../pyFTS.data.html#pyFTS.data.EURUSD.get_dataframe">[docs]</a><span class="k">def</span> <span class="nf">get_dataframe</span><span class="p">():</span>

View File

@ -75,14 +75,15 @@
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<div class="viewcode-block" id="get_data"><a class="viewcode-back" href="../../../pyFTS.data.html#pyFTS.data.Ethereum.get_data">[docs]</a><span class="k">def</span> <span class="nf">get_data</span><span class="p">():</span>
<div class="viewcode-block" id="get_data"><a class="viewcode-back" href="../../../pyFTS.data.html#pyFTS.data.Ethereum.get_data">[docs]</a><span class="k">def</span> <span class="nf">get_data</span><span class="p">(</span><span class="n">field</span><span class="o">=</span><span class="s1">&#39;avg&#39;</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Get the univariate time series data.</span>
<span class="sd"> :param field: dataset field to load</span>
<span class="sd"> :return: numpy array</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">dat</span> <span class="o">=</span> <span class="n">get_dataframe</span><span class="p">()</span>
<span class="k">return</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">dat</span><span class="p">[</span><span class="s2">&quot;Avg&quot;</span><span class="p">])</span></div>
<span class="k">return</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">dat</span><span class="p">[</span><span class="n">field</span><span class="p">])</span></div>
<div class="viewcode-block" id="get_dataframe"><a class="viewcode-back" href="../../../pyFTS.data.html#pyFTS.data.Ethereum.get_dataframe">[docs]</a><span class="k">def</span> <span class="nf">get_dataframe</span><span class="p">():</span>

View File

@ -73,14 +73,15 @@
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<div class="viewcode-block" id="get_data"><a class="viewcode-back" href="../../../pyFTS.data.html#pyFTS.data.GBPUSD.get_data">[docs]</a><span class="k">def</span> <span class="nf">get_data</span><span class="p">():</span>
<div class="viewcode-block" id="get_data"><a class="viewcode-back" href="../../../pyFTS.data.html#pyFTS.data.GBPUSD.get_data">[docs]</a><span class="k">def</span> <span class="nf">get_data</span><span class="p">(</span><span class="n">field</span><span class="o">=</span><span class="s1">&#39;avg&#39;</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Get the univariate time series data.</span>
<span class="sd"> :param field: dataset field to load</span>
<span class="sd"> :return: numpy array</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">dat</span> <span class="o">=</span> <span class="n">get_dataframe</span><span class="p">()</span>
<span class="k">return</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">dat</span><span class="p">[</span><span class="s2">&quot;Avg&quot;</span><span class="p">])</span></div>
<span class="k">return</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">dat</span><span class="p">[</span><span class="n">field</span><span class="p">])</span></div>
<div class="viewcode-block" id="get_dataframe"><a class="viewcode-back" href="../../../pyFTS.data.html#pyFTS.data.GBPUSD.get_dataframe">[docs]</a><span class="k">def</span> <span class="nf">get_dataframe</span><span class="p">():</span>

View File

@ -194,13 +194,15 @@ If the file dont already exists, it will be downloaded and decompressed.</p>
<p>Source: <a class="reference external" href="https://finance.yahoo.com/quote/BTC-USD?p=BTC-USD">https://finance.yahoo.com/quote/BTC-USD?p=BTC-USD</a></p>
<dl class="function">
<dt id="pyFTS.data.Bitcoin.get_data">
<code class="descclassname">pyFTS.data.Bitcoin.</code><code class="descname">get_data</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/data/Bitcoin.html#get_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.data.Bitcoin.get_data" title="Permalink to this definition"></a></dt>
<code class="descclassname">pyFTS.data.Bitcoin.</code><code class="descname">get_data</code><span class="sig-paren">(</span><em>field='avg'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/data/Bitcoin.html#get_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.data.Bitcoin.get_data" title="Permalink to this definition"></a></dt>
<dd><p>Get the univariate time series data.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">numpy array</td>
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>field</strong> dataset field to load</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">numpy array</td>
</tr>
</tbody>
</table>
@ -228,13 +230,15 @@ If the file dont already exists, it will be downloaded and decompressed.</p>
<p>Source: <a class="reference external" href="https://finance.yahoo.com/quote/%5EGSPC/history?p=%5EGSPC">https://finance.yahoo.com/quote/%5EGSPC/history?p=%5EGSPC</a></p>
<dl class="function">
<dt id="pyFTS.data.DowJones.get_data">
<code class="descclassname">pyFTS.data.DowJones.</code><code class="descname">get_data</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/data/DowJones.html#get_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.data.DowJones.get_data" title="Permalink to this definition"></a></dt>
<code class="descclassname">pyFTS.data.DowJones.</code><code class="descname">get_data</code><span class="sig-paren">(</span><em>field='avg'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/data/DowJones.html#get_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.data.DowJones.get_data" title="Permalink to this definition"></a></dt>
<dd><p>Get the univariate time series data.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">numpy array</td>
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>field</strong> dataset field to load</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">numpy array</td>
</tr>
</tbody>
</table>
@ -285,13 +289,15 @@ If the file dont already exists, it will be downloaded and decompressed.</p>
<p>Source: <a class="reference external" href="https://finance.yahoo.com/quote/ETH-USD?p=ETH-USD">https://finance.yahoo.com/quote/ETH-USD?p=ETH-USD</a></p>
<dl class="function">
<dt id="pyFTS.data.Ethereum.get_data">
<code class="descclassname">pyFTS.data.Ethereum.</code><code class="descname">get_data</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/data/Ethereum.html#get_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.data.Ethereum.get_data" title="Permalink to this definition"></a></dt>
<code class="descclassname">pyFTS.data.Ethereum.</code><code class="descname">get_data</code><span class="sig-paren">(</span><em>field='avg'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/data/Ethereum.html#get_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.data.Ethereum.get_data" title="Permalink to this definition"></a></dt>
<dd><p>Get the univariate time series data.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">numpy array</td>
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>field</strong> dataset field to load</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">numpy array</td>
</tr>
</tbody>
</table>
@ -318,13 +324,15 @@ If the file dont already exists, it will be downloaded and decompressed.</p>
<p>Daily averaged quotations, by business day, from 2016 to 2018.</p>
<dl class="function">
<dt id="pyFTS.data.EURGBP.get_data">
<code class="descclassname">pyFTS.data.EURGBP.</code><code class="descname">get_data</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/data/EURGBP.html#get_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.data.EURGBP.get_data" title="Permalink to this definition"></a></dt>
<code class="descclassname">pyFTS.data.EURGBP.</code><code class="descname">get_data</code><span class="sig-paren">(</span><em>field='avg'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/data/EURGBP.html#get_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.data.EURGBP.get_data" title="Permalink to this definition"></a></dt>
<dd><p>Get the univariate time series data.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">numpy array</td>
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>field</strong> dataset field to load</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">numpy array</td>
</tr>
</tbody>
</table>
@ -351,13 +359,15 @@ If the file dont already exists, it will be downloaded and decompressed.</p>
<p>Daily averaged quotations, by business day, from 2016 to 2018.</p>
<dl class="function">
<dt id="pyFTS.data.EURUSD.get_data">
<code class="descclassname">pyFTS.data.EURUSD.</code><code class="descname">get_data</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/data/EURUSD.html#get_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.data.EURUSD.get_data" title="Permalink to this definition"></a></dt>
<code class="descclassname">pyFTS.data.EURUSD.</code><code class="descname">get_data</code><span class="sig-paren">(</span><em>field='avg'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/data/EURUSD.html#get_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.data.EURUSD.get_data" title="Permalink to this definition"></a></dt>
<dd><p>Get the univariate time series data.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">numpy array</td>
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>field</strong> dataset field to load</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">numpy array</td>
</tr>
</tbody>
</table>
@ -384,13 +394,15 @@ If the file dont already exists, it will be downloaded and decompressed.</p>
<p>Daily averaged quotations, by business day, from 2016 to 2018.</p>
<dl class="function">
<dt id="pyFTS.data.GBPUSD.get_data">
<code class="descclassname">pyFTS.data.GBPUSD.</code><code class="descname">get_data</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/data/GBPUSD.html#get_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.data.GBPUSD.get_data" title="Permalink to this definition"></a></dt>
<code class="descclassname">pyFTS.data.GBPUSD.</code><code class="descname">get_data</code><span class="sig-paren">(</span><em>field='avg'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/data/GBPUSD.html#get_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.data.GBPUSD.get_data" title="Permalink to this definition"></a></dt>
<dd><p>Get the univariate time series data.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">numpy array</td>
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>field</strong> dataset field to load</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">numpy array</td>
</tr>
</tbody>
</table>

File diff suppressed because one or more lines are too long

View File

@ -12,15 +12,15 @@ import pandas as pd
import numpy as np
def get_data():
def get_data(field='avg'):
"""
Get the univariate time series data.
:param field: dataset field to load
:return: numpy array
"""
dat = get_dataframe()
return np.array(dat["Avg"])
return np.array(dat[field])
def get_dataframe():
"""

View File

@ -12,14 +12,15 @@ import pandas as pd
import numpy as np
def get_data():
def get_data(field='avg'):
"""
Get the univariate time series data.
:param field: dataset field to load
:return: numpy array
"""
dat = get_dataframe()
return np.array(dat["Avg"])
return np.array(dat[field])
def get_dataframe():

View File

@ -10,14 +10,15 @@ import pandas as pd
import numpy as np
def get_data():
def get_data(field='avg'):
"""
Get the univariate time series data.
:param field: dataset field to load
:return: numpy array
"""
dat = get_dataframe()
return np.array(dat["Avg"])
return np.array(dat[field])
def get_dataframe():

View File

@ -10,14 +10,15 @@ import pandas as pd
import numpy as np
def get_data():
def get_data(field='avg'):
"""
Get the univariate time series data.
:param field: dataset field to load
:return: numpy array
"""
dat = get_dataframe()
return np.array(dat["Avg"])
return np.array(dat[field])
def get_dataframe():

View File

@ -12,14 +12,15 @@ import pandas as pd
import numpy as np
def get_data():
def get_data(field='avg'):
"""
Get the univariate time series data.
:param field: dataset field to load
:return: numpy array
"""
dat = get_dataframe()
return np.array(dat["Avg"])
return np.array(dat[field])
def get_dataframe():

View File

@ -10,14 +10,15 @@ import pandas as pd
import numpy as np
def get_data():
def get_data(field='avg'):
"""
Get the univariate time series data.
:param field: dataset field to load
:return: numpy array
"""
dat = get_dataframe()
return np.array(dat["Avg"])
return np.array(dat[field])
def get_dataframe():