us-bea / beaapi

A Python library library to make it easier to retrieve and work with BEA data.
https://us-bea.github.io/beaapi/
Creative Commons Zero v1.0 Universal
24 stars 4 forks source link

Lots of issues getting table names #4

Closed rcyost closed 2 months ago

rcyost commented 10 months ago

Having lots of issues with getting the table names out of the API.

bquistorff commented 2 months ago

Thanks for your comment. This can be difficult. The information varies depending on the dataset queried, both due to the underlying API implementation and that in some areas the API data are not structured similar to the tables in iTables. A few options:

  1. Sometimes the table name is returned as table metadata, typically in the "Notes" key: tbl.attrs['detail']['Notes']. See the README.md for an example.
  2. Other information may be available. You can check first in the API userguide. This packages documentation also lists additional resources, such as the table registers.