# EMBI data availability

**URL:** <https://dbnomics.discourse.group/t/embi-data-availability/584>\
**Category:** Uncategorized\
**Created:** [May 9, 2022, 1:43am UTC](https://dbnomics.discourse.group/t/embi-data-availability/584 "2022-05-09T01:43:06Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![mk1564](https://avatars.discourse-cdn.com/v4/letter/m/898d66/32.png) [@mk1564](https://dbnomics.discourse.group/u/mk1564)\
**Post date:** [May 9, 2022, 1:43am UTC](https://dbnomics.discourse.group/t/embi-data-availability/584/1 "2022-05-09T01:43:06Z")

</div>

Hi everyone,

Just to ask a quick question on data availability: does anyone know where I can find EMBI spread data in monthly/quarterly frequency? I know I can access to yearly data at the World Bank through DBnomics [WB/GEM | DBnomics](https://db.nomics.world/WB/GEM?q=embi). But it seems like the World Bank has more frequent data that I can’t see at DBnomics: [Global Economic Monitor (GEM) | DataBank (worldbank.org)](https://databank.worldbank.org/id/d79f5818?Report_Name=EMBI-TS).

---

<div class="post-metadata">

**Author:** ![cbenz](https://yyz2.discourse-cdn.com/free1/user_avatar/dbnomics.discourse.group/cbenz/32/33_2.png) [@cbenz](https://dbnomics.discourse.group/u/cbenz)\
**Post date:** [May 9, 2022, 8:20am UTC](https://dbnomics.discourse.group/t/embi-data-availability/584/2 "2022-05-09T08:20:05Z")

</div>

Hi @mk1564 and welcome to the DBnomics forum!

We are currently rewriting the DBnomics fetcher for the World Bank, because of a rewrite of the World Bank’s web API. Maybe that data is not on DBnomics because the current fetcher has not been able to run for a couple of weeks.

I need to look further and I’ll keep you informed here.

---

<div class="post-metadata">

**Author:** ![mk1564](https://avatars.discourse-cdn.com/v4/letter/m/898d66/32.png) [@mk1564](https://dbnomics.discourse.group/u/mk1564)\
**Post date:** [May 9, 2022, 12:43pm UTC](https://dbnomics.discourse.group/t/embi-data-availability/584/3 "2022-05-09T12:43:24Z")

</div>

Thanks @cbenz for your reply! Got it. I will wait until it is written. FYI: I am using Julia.

---

<div class="post-metadata">

**Author:** ![cbenz](https://yyz2.discourse-cdn.com/free1/user_avatar/dbnomics.discourse.group/cbenz/32/33_2.png) [@cbenz](https://dbnomics.discourse.group/u/cbenz)\
**Post date:** [June 29, 2022, 11:46am UTC](https://dbnomics.discourse.group/t/embi-data-availability/584/4 "2022-06-29T11:46:34Z")

</div>

The World Bank fetcher has been upgraded and deployed in the previous days, and data has been updated also. GEM is part of the update.

@mk1564 You can check that here: [WB/GEM | DBnomics](https://db.nomics.world/WB/GEM)

Thanks for your patience and please ask for further details if needed 🙂

---

<div class="post-metadata">

**Author:** ![mk1564](https://avatars.discourse-cdn.com/v4/letter/m/898d66/32.png) [@mk1564](https://dbnomics.discourse.group/u/mk1564)\
**Post date:** [June 29, 2022, 12:32pm UTC](https://dbnomics.discourse.group/t/embi-data-availability/584/5 "2022-06-29T12:32:02Z")

</div>

Thanks for the update! @cbenz

I just checked EMBI+ series at DBnomics, but it seems like quarterly or monthly data is still unavailable? For example, there is just one series for Colombia, which is a yearly series: [WB/GEM | DBnomics](https://db.nomics.world/WB/GEM?dimensions=%7B%22indicator%22%3A%5B%22EMBIG%22%5D%7D&q=colombia). But WB/GEM does have those series for Colombia at [Global Economic Monitor (GEM) | DataBank (worldbank.org)](https://databank.worldbank.org/id/d79f5818?Report_Name=EMBI-TS).

---

<div class="post-metadata">

**Author:** ![cbenz](https://yyz2.discourse-cdn.com/free1/user_avatar/dbnomics.discourse.group/cbenz/32/33_2.png) [@cbenz](https://dbnomics.discourse.group/u/cbenz)\
**Post date:** [June 29, 2022, 3:25pm UTC](https://dbnomics.discourse.group/t/embi-data-availability/584/6 "2022-06-29T15:25:07Z")

</div>

Wow, I think I understand now… thanks for insisting! After a couple of hours I could find out a solution. Below are the details.

Actually after double checking the download script of the WB fetcher, it seems that it calls the API endpoint called “aggretate” (cf [docs](https://datahelpdesk.worldbank.org/knowledgebase/articles/898614-aggregate-api-queries)). But besides exists another API endpoint called"advanced data query" which is described in the [advanced docs page](https://datahelpdesk.worldbank.org/knowledgebase/articles/1886686-advanced-data-api-queries).

For example here are 2 URLs for comparing:

- aggregate API endpoint: [https://api.worldbank.org/v2/countries/COL/indicator/EMBIG](https://api.worldbank.org/v2/countries/COL/indicator/EMBIG)
- advanced data query API endpoint: [https://api.worldbank.org/v2/sources/15/country/COL/series/EMBIG?per\_page=1000](https://api.worldbank.org/v2/sources/15/country/COL/series/EMBIG?per_page=1000)

In the second API endpoint, there are monthly, quarterly and annual series all together.

I’m going to update the WB download script again to take advantage of that new API endpoint, sort the series by frequency, inject a new FREQ dimension, and make this available.

Now I wonder why the databank UI does not offer annual series (cf [GEM on databank](https://databank.worldbank.org/source/global-economic-monitor-(gem))) in the “time” panel… but that’s not really a blocking question.

---

<div class="post-metadata">

**Author:** ![mk1564](https://avatars.discourse-cdn.com/v4/letter/m/898d66/32.png) [@mk1564](https://dbnomics.discourse.group/u/mk1564)\
**Post date:** [June 29, 2022, 3:40pm UTC](https://dbnomics.discourse.group/t/embi-data-availability/584/7 "2022-06-29T15:40:16Z")

</div>

Thanks @cbenz for your replay! Yes, it does seem like the WB databank UI does not separate out the data frequencies (yearly/quarterly/monthly) in the Time panel. I hope this does not make the update too complicated. Thank you so much again!

---

<div class="post-metadata">

**Author:** ![cbenz](https://yyz2.discourse-cdn.com/free1/user_avatar/dbnomics.discourse.group/cbenz/32/33_2.png) [@cbenz](https://dbnomics.discourse.group/u/cbenz)\
**Post date:** [July 4, 2022, 8:49am UTC](https://dbnomics.discourse.group/t/embi-data-availability/584/8 "2022-07-04T08:49:57Z")

</div>

Dear @mk1564, I could retrieve the other frequencies we talked about.

Here is the monthly series I mentioned in my previous post, now on DBnomics, as an example: [WB/GEM/M-EMBIG-COL | DBnomics](https://db.nomics.world/WB/GEM/M-EMBIG-COL)

Please tell me if it’s OK for you now 🙂

---

<div class="post-metadata">

**Author:** ![mk1564](https://avatars.discourse-cdn.com/v4/letter/m/898d66/32.png) [@mk1564](https://dbnomics.discourse.group/u/mk1564)\
**Post date:** [July 4, 2022, 4:03pm UTC](https://dbnomics.discourse.group/t/embi-data-availability/584/9 "2022-07-04T16:03:13Z")

</div>

Thank you so much for this update! Yes, I checked that I can download monthly series for EMBIG. This is great!

One thing that may be related to WB part of update: the usual Julia command does not work. For example, in the examples in [DBnomics.jl](https://github.com/s915/DBnomics.jl).

```auto
# Fetch several values of several dimensions from dataset 'Doing business' (DB) of World Bank :
df3 = rdb("WB", "DB", dimensions = Dict(:country => ["DZ", "PE"], :indicator => ["ENF.CONT.COEN.COST.ZS", "IC.REG.COST.PC.FE.ZS"]));
# or
df3 = rdb("WB", "DB", dimensions = (country = ["DZ", "PE"], indicator = ["ENF.CONT.COEN.CO

```

do not work anymore.

Maybe there is an updated way to fetch multiple series with dimensions for WB data?

---

<div class="post-metadata">

**Author:** ![cbenz](https://yyz2.discourse-cdn.com/free1/user_avatar/dbnomics.discourse.group/cbenz/32/33_2.png) [@cbenz](https://dbnomics.discourse.group/u/cbenz)\
**Post date:** [July 5, 2022, 2:48pm UTC](https://dbnomics.discourse.group/t/embi-data-availability/584/10 "2022-07-05T14:48:19Z")

</div>

Correct, the error is due the change of some codes:

- the dataset code `DB` was updated to `DBS` (by the World Bank)
- the addition of the new dimension named “frequency” (by me following our discussion)
- the changes of the country codes from 2 letters to 3 letters (by the World Bank)

I did not realize that this particular dataset was used as an example in the README!

I proposed a pull request to the author of the package, cf [#12](https://github.com/s915/DBnomics.jl/pull/12).

---

<div class="post-metadata">

**Author:** ![mk1564](https://avatars.discourse-cdn.com/v4/letter/m/898d66/32.png) [@mk1564](https://dbnomics.discourse.group/u/mk1564)\
**Post date:** [July 5, 2022, 3:14pm UTC](https://dbnomics.discourse.group/t/embi-data-availability/584/11 "2022-07-05T15:14:32Z")

</div>

Thanks for the pull request! I checked that the revised version of the example code with new country code and dataset code works fine in Julia with `DBS` dataset.

However, one thing I just found is that the fetching code for `WDI` part of WB data has not been revised? For example, you can see that the data series can not be searched for along the frequency dimension in the webpage of [WB/WDI | DBnomics](https://db.nomics.world/WB/WDI?dimensions=%7B%22indicator%22%3A%5B%22NE.CON.GOVT.ZS%22%5D%7D).

Maybe this is why I cannot get the data by using a similarly revised code like below?

```auto
julia> rdb("WB","WDI", dimensions = (country = ["KOR"], frequency = ["A"], indicator = ["NE.CON.GOVT.ZS"]))
┌ Warning: No data series found.
└ @ DBnomics C:\Users\Min\.julia\packages\DBnomics\otwZO\src\dot_rdb.jl:49

```

\*Update: This issue has been already reported. See [WDI and error from frequency code - #2 by cbenz](https://dbnomics.discourse.group/t/wdi-and-error-from-frequency-code/610/2).

---

<div class="post-metadata">

**Author:** ![cbenz](https://yyz2.discourse-cdn.com/free1/user_avatar/dbnomics.discourse.group/cbenz/32/33_2.png) [@cbenz](https://dbnomics.discourse.group/u/cbenz)\
**Post date:** [July 7, 2022, 7:41am UTC](https://dbnomics.discourse.group/t/embi-data-availability/584/12 "2022-07-07T07:41:54Z")

</div>

Yes, you’re right ! I updated the [other forum post](https://dbnomics.discourse.group/t/wdi-and-error-from-frequency-code/610/5) you mentioned and fixed the issue.

Thanks again for the report!

---

<div class="post-metadata">

**Author:** ![mk1564](https://avatars.discourse-cdn.com/v4/letter/m/898d66/32.png) [@mk1564](https://dbnomics.discourse.group/u/mk1564)\
**Post date:** [July 7, 2022, 12:58pm UTC](https://dbnomics.discourse.group/t/embi-data-availability/584/13 "2022-07-07T12:58:53Z")

</div>

This is great. Thank you so much! 😁
