Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct EcondbReader's API URL format #670

Merged
merged 4 commits into from Sep 16, 2019

Conversation

@econdb
Copy link
Contributor

econdb commented Sep 9, 2019

Sets correct default query parameter before API requests.

Detailed documentation and usage examples to follow in 1 week.

@gliptak

This comment has been minimized.

Copy link
Contributor

gliptak commented Sep 13, 2019

This still shows an Econdb error
https://travis-ci.org/pydata/pandas-datareader/jobs/582907139

_________________________ TestEcondb.test_get_tourism __________________________
self = <pandas_datareader.tests.test_econdb.TestEcondb object at 0x7fa06f666a10>
    def test_get_tourism(self):
        # OECD
        # TOURISM_INBOUND
    
        df = web.DataReader(
            'dataset=OE_TOURISM_INBOUND&COUNTRY=JPN,USA&'
            'VARIABLE=INB_ARRIVALS_TOTAL', 'econdb',
            start=pd.Timestamp('2008-01-01'), end=pd.Timestamp('2012-01-01'))
        df = df.astype(np.float)
        jp = np.array([8351000, 6790000, 8611000, 6219000,
                       8368000], dtype=float)
        us = np.array([175702309, 160507417, 164079732, 167600277,
                       171320408], dtype=float)
        index = pd.date_range('2008-01-01', '2012-01-01', freq='AS',
                              name='TIME_PERIOD')
    
        # sometimes the country and variable columns are swapped
>       lvl1 = df.columns.levels[0][0]
E       AttributeError: 'Index' object has no attribute 'levels'
pandas_datareader/tests/test_econdb.py:51: AttributeError
@econdb

This comment has been minimized.

Copy link
Contributor Author

econdb commented Sep 14, 2019

Should work now @gliptak , that dataset was briefly unavailable in the database.

@gliptak

This comment has been minimized.

Copy link
Contributor

gliptak commented Sep 14, 2019

@econdb could you repush to trigger another build?

@bashtage bashtage closed this Sep 14, 2019
@bashtage bashtage reopened this Sep 14, 2019
@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Sep 14, 2019

Codecov Report

Merging #670 into master will decrease coverage by 10.32%.
The diff coverage is 66.66%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #670       +/-   ##
===========================================
- Coverage   81.95%   71.62%   -10.33%     
===========================================
  Files          61       61               
  Lines        2676     2675        -1     
  Branches      303      303               
===========================================
- Hits         2193     1916      -277     
- Misses        405      683      +278     
+ Partials       78       76        -2
Impacted Files Coverage Δ
pandas_datareader/tests/test_econdb.py 100% <100%> (+64.51%) ⬆️
pandas_datareader/econdb.py 83.33% <50%> (+38.17%) ⬆️
pandas_datareader/av/forex.py 22.72% <0%> (-72.73%) ⬇️
pandas_datareader/av/time_series.py 31.25% <0%> (-68.75%) ⬇️
pandas_datareader/tests/av/test_av_time_series.py 28.4% <0%> (-65.91%) ⬇️
pandas_datareader/av/quotes.py 26.47% <0%> (-64.71%) ⬇️
pandas_datareader/quandl.py 29.26% <0%> (-63.42%) ⬇️
pandas_datareader/tiingo.py 38.29% <0%> (-57.45%) ⬇️
pandas_datareader/tests/av/test_av_forex.py 48% <0%> (-52%) ⬇️
pandas_datareader/tests/test_quandl.py 40% <0%> (-49.1%) ⬇️
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6a9068f...19f7f40. Read the comment docs.

econdb added 2 commits Sep 14, 2019
@gliptak

This comment has been minimized.

Copy link
Contributor

gliptak commented Sep 15, 2019

@bashtage bashtage merged commit 2b86f67 into pydata:master Sep 16, 2019
1 check was pending
1 check was pending
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
@bashtage

This comment has been minimized.

Copy link
Contributor

bashtage commented Sep 16, 2019

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.