christophergandrud / christophergandrud/imfr

imf_data issues

Open
#30 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
R
Stars
48
Forks
5
PR merge metrics
No merged PRs in 30d

Description

I'm trying to run this code:
```
goods_export_Q = imf_data(database_id = 'BOP', indicator = 'BXG_BP6_USD',
country = 'all', start = '2000-Q1', freq = 'Q')
```

And it results to a warning message:
```
Warning message:
In sub_data[, indicator] %>% as.numeric : NAs introduced by coercion
```

The code runs but when I view the data, it has a lot of NAs in it even though it shouldn't be NA. Any solutions to this?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running the reported imf_data call for the BOP database and BXG_BP6_USD indicator, then inspect the returned values at the point where the indicator column is coerced to numeric. Compare the IMF response values with the resulting NAs and identify why valid observations trigger the warning; done means the reported data no longer loses valid values during conversion.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
api, data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.