Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • dbnomics

    This is not a question but rather my experience with getting dbnomics to work. Maybe others will benefit, hence I am posting.

    I got an email from Stata yesterday and from it I learnt about dbnomics:
    https://www.stata.com/stata-news/new...orner_dbnomics

    So I installed the package using
    Code:
    ssc install dbnomics
    It got installed with no issues.

    To load the list of providers of data through dbnomics (e.g. World Bank), I did
    Code:
    dbnomics providers
    I got
    Code:
    class libjson undefined
    The error message is actually much longer but I am posting the relevant part. I figured it is a dependency and so I installed libjson:
    Code:
    ssc install libjson
    After rerunning,
    Code:
    dbnomics providers
    I then got
    Code:
    urlencode() is built-in
                     <istmt>:  3499  s not found
                     <istmt>:  3499  a not found
    'return' found where almost anything else expected
    expression invalid
    Error: the package moss is required by dbnomics. Try ssc install moss
    r(111);
    I figured it is another dependency and so I installed moss:
    Code:
    ssc install moss
    But it still didn't work:
    Code:
    urlencode() is built-in
                     <istmt>:  3499  s not found
                     <istmt>:  3499  a not found
    'return' found where almost anything else expected
    expression invalid
    Downloading list of providers...
    But nothing showed up in the Results window or the Variables window to indicate that the list of providers actually got downloaded. But in reality it did.
    You have to execute the command a second time, and with the 'clear' option:
    Code:
    dbnomics providers, clear
    This time you should see the Variables window get populated. You can then use the Data Editor (Edit/Browse) window or the list command to see the 62 different providers of data through dbnomics.

    Hope that helps.

  • #2
    When I try

    Code:
    ssc desc dbnomics
    I see

    Requires: Stata version 14, libjson and moss from SSC (q.v.)
    so it seems that all this is documented.


    Comment


    • #3
      Thanks. Didn't realize the dependencies are listed in the ssc description.

      Comment


      • #4
        Dependencies are also documented in the author's slides referred to in the link in #1. But no harm done: what you missed could be missed by others too, so another story like this is helpful.

        Comment


        • #5
          Hi all,
          I've also been experimenting with the Stata package which is a welcomed addition! For the most part it appears to be working, but I have run into a particular issue when attempting to import a complete World Bank dataset, specifically the GDP per capita data:

          Code:
          dbnomics import, provider(WB) dataset(WDI) indicator(NY.GDP.PCAP.KD) clear
          For some reason it returns the error r(679) which I believe indicates some sort of web error. To be clear, I’m able to successfully import the data when I specify a specific country, but not the entire indictor. Not sure if anyone has a solution to this, or if others have uncovered other errors?


          Comment

          Working...
          X