Skip to main content

No project description provided

Project description

BEAquery

PyPI - Version PyPI - Python Version


Table of Contents

BEA query is a set of commands to investigate, retrieve, or view datasets provided by BEA.

beaillustrated collects information about all of the BEA datasets, their parameters, and parameter values. It then displays this information in your browser

The remaining commands retrieve and either store data in CSV files or display the data along with interactive plots in your browser.

beaqueryq can be used to do all that the commands above do.

I have changed the arguments to the commands to correspond with those used by BEA.

Installation


##
## beaillustrated
##
usage: beaillustrated [-h] [--format {json,XML}] [--directory DIRECTORY]

display BEA data model

options:
-h, --help show this help message and exit
--format {json,XML} requested BEA result format(json)
--directory DIRECTORY
where to store the generated html


##
## beafixedassets
##
usage: beafixedassets [-h] --TableName TABLENAME --Year YEAR
[--format {json,XML}] [--csvfn CSVFN]
[--splitkey SPLITKEY] [--xkey XKEY] [--ykey YKEY]
[--unitskey UNITSKEY] [--htmlfn HTMLFN]

get BEA FixedAssets data

options:
-h, --help show this help message and exit
--TableName TABLENAME
FixedAssets table name
--Year YEAR year YYYY or X for all years
--format {json,XML} result format(json)
--csvfn CSVFN name of file to store dataset CSV result
--splitkey SPLITKEY table column name(LineDescription) to use to split the
plots
--xkey XKEY table column name(TimePeriod) to use to plot the data
--ykey YKEY table column name(DataValue) to use to plot the data
--unitskey UNITSKEY table column name(METRIC_NAME) to use to label the
data
--htmlfn HTMLFN name of file to store dataset HTML result


##
## beagdpbyind
##
usage: beagdpbyind [-h] --TableID TABLEID --Industry INDUSTRY --Frequency
FREQUENCY --Year YEAR [--format {json,XML}]
[--csvfn CSVFN] [--splitkey SPLITKEY] [--xkey XKEY]
[--ykey YKEY] [--unitskey UNITSKEY] [--htmlfn HTMLFN]

get BEA GDPbyIndustry data

options:
-h, --help show this help message and exit
--TableID TABLEID table id
--Industry INDUSTRY industry
--Frequency FREQUENCY
frequency M, Q, A or comma separated list
--Year YEAR year YYYY or ALL
--format {json,XML} query result format(json)
--csvfn CSVFN name of file to store dataset CSV result
--splitkey SPLITKEY table column name(IndustrYDescription) to use to split
the plots
--xkey XKEY table column name(Year) to use to plot the data
--ykey YKEY table column name(DataValue) to use to plot the data
--unitskey UNITSKEY y key units(Billions?) to use to label the plotdata
--htmlfn HTMLFN name of file to store dataset HTML result


##
## beaiip
##
usage: beaiip [-h] --TypeOfInvestment TYPEOFINVESTMENT --Composition
COMPOSITION --Frequency FREQUENCY --Year YEAR
[--format {json,XML}] [--csvfn CSVFN] [--splitkey SPLITKEY]
[--xkey XKEY] [--ykey YKEY] [--unitskey UNITSKEY]
[--htmlfn HTMLFN]

get BEA IIP data

options:
-h, --help show this help message and exit
--TypeOfInvestment TYPEOFINVESTMENT
type of investment
--Composition COMPOSITION
composition
--Frequency FREQUENCY
frequency M, Q, A or comma separated list
--Year YEAR year YYYY or ALL
--format {json,XML} result format(json)
--csvfn CSVFN name of file to store dataset CSV result
--splitkey SPLITKEY table column name(Component) to use to split the plots
--xkey XKEY table column name(TimePeriod) to use to plot the data
--ykey YKEY table column name(DataValue) to use to plot the data
--unitskey UNITSKEY table column name(CL_UNIT) to use to label the data
--htmlfn HTMLFN name of file to store dataset HTML result


##
## beainputoutput
##
usage: beainputoutput [-h] --TableID TABLEID --Year YEAR
[--format {json,XML}] [--csvfn CSVFN]
[--splitkey SPLITKEY] [--xkey XKEY] [--ykey YKEY]
[--unitskey UNITSKEY] [--htmlfn HTMLFN]

get BEA InputOutput data

options:
-h, --help show this help message and exit
--TableID TABLEID table id
--Year YEAR year YYYY or ALL
--format {json,XML} request result format(json)
--csvfn CSVFN name of file to store dataset CSV result
--splitkey SPLITKEY table column name(ColDescr) to use to split the plots
--xkey XKEY table column name(Year) to use to plot the data
--ykey YKEY table column name(DataValue) to use to plot the data
--unitskey UNITSKEY table column name(ColType) to y label the plot
--htmlfn HTMLFN name of file to store dataset HTML result


##
## beaissta
##
usage: beaissta [-h] --Channel CHANNEL --Destination DESTINATION --Industry
INDUSTRY --AreaOrCountry AREAORCOUNTRY --Year YEAR
[--format {json,XML}] [--csvfn CSVFN] [--splitkey SPLITKEY]
[--xkey XKEY] [--ykey YKEY] [--unitskey UNITSKEY]
[--htmlfn HTMLFN]

get BEA IntlServSTA data

options:
-h, --help show this help message and exit
--Channel CHANNEL channel
--Destination DESTINATION
destination
--Industry INDUSTRY industry
--AreaOrCountry AREAORCOUNTRY
area or country
--Year YEAR year YYYY or ALL
--format {json,XML} query result format(json)
--csvfn CSVFN name of file to store dataset CSV result
--splitkey SPLITKEY table column name(TimeSeriesDescription) to use to
split the plots
--xkey XKEY table column name(Year) to use to plot the data
--ykey YKEY table column name(DataValue) to use to plot the data
--unitskey UNITSKEY table column name(CL_UNIT) to y label the plot
--htmlfn HTMLFN name of file to store dataset HTML result


##
## beaistrade
##
usage: beaistrade [-h] --TypeOfService TYPEOFSERVICE
[--TradeDirection TRADEDIRECTION]
[--affiliation AFFILIATION]
[--AreaOrCountry AREAORCOUNTRY] --Year YEAR
[--format {json,XML}] [--csvfn CSVFN]
[--splitkey SPLITKEY] [--xkey XKEY] [--ykey YKEY]
[--unitskey UNITSKEY] [--htmlfn HTMLFN]

get BEA IntlServTrade data

options:
-h, --help show this help message and exit
--TypeOfService TYPEOFSERVICE
type of service
--TradeDirection TRADEDIRECTION
trade direction
--affiliation AFFILIATION
affiliation
--AreaOrCountry AREAORCOUNTRY
area or country
--Year YEAR year YYYY or ALL
--format {json,XML} query result format(json)
--csvfn CSVFN name of file to store dataset CSV result
--splitkey SPLITKEY table column name(TimeSeriesDescription) to use to
split the plots
--xkey XKEY table column name(Year) to use to plot the data
--ykey YKEY table column name(DataValue) to use to plot the data
--unitskey UNITSKEY table column name(CL_UNIT) to use to label the data
--htmlfn HTMLFN name of file to store dataset HTML result


##
## beaita
##
usage: beaita [-h] --Indicator INDICATOR --AreaOrCountry AREAORCOUNTRY
--Frequency FREQUENCY --Year YEAR [--format {json,XML}]
[--csvfn CSVFN] [--splitkey SPLITKEY] [--xkey XKEY]
[--ykey YKEY] [--unitskey UNITSKEY] [--htmlfn HTMLFN]

get BEA ITA data

options:
-h, --help show this help message and exit
--Indicator INDICATOR
ITA indicator
--AreaOrCountry AREAORCOUNTRY
ITA area or country
--Frequency FREQUENCY
frequency M, Q, A or comma separated list
--Year YEAR year YYYY or ALL
--format {json,XML} query result format(json)
--csvfn CSVFN name of file to store dataset CSV result
--splitkey SPLITKEY table column name(TimeSeriesDescription) to use to
split the plots
--xkey XKEY table column name(Year) to use to plot the data
--ykey YKEY table column name(DataValue) to use to plot the data
--unitskey UNITSKEY table column name({'option_strings': ['--unitskey'],
'dest': 'unitskey', 'nargs': None, 'const': None,
'default': 'CL_UNIT', 'type': None, 'choices': None,
'required': False, 'help': 'table column name(%s) to y
label the plot', 'metavar': None, 'container':
,
'prog': 'beaita'}) to y label the plot
--htmlfn HTMLFN name of file to store dataset HTML result


##
## beamne
##
usage: beamne [-h] [--SeriesID SERIESID] --DirectionOfInvestment
DIRECTIONOFINVESTMENT --Classification CLASSIFICATION
[--Country COUNTRY] [--Industry INDUSTRY] --Year YEAR
[--format {json,XML}] [--csvfn CSVFN] [--splitkey SPLITKEY]
[--xkey XKEY] [--ykey YKEY] [--unitskey UNITSKEY]
[--htmlfn HTMLFN]

get BEA MNE data

options:
-h, --help show this help message and exit
--SeriesID SERIESID MNE series id
--DirectionOfInvestment DIRECTIONOFINVESTMENT
direction of investment
--Classification CLASSIFICATION
classification
--Country COUNTRY country
--Industry INDUSTRY industry
--Year YEAR year YYYY or all
--format {json,XML} query result format(json)
--csvfn CSVFN name of file to store dataset CSV result
--splitkey SPLITKEY table column name(SeriesName) to use to split the
plots
--xkey XKEY table column name(Year) to use to plot the data
--ykey YKEY table column name(DataValue) to use to plot the data
--unitskey UNITSKEY table column name(TableScale) to to y label the plot
--htmlfn HTMLFN name of file to store dataset HTML result


##
## beanipa
##
usage: beanipa [-h] --TableName TABLENAME [--ShowMillions SHOWMILLIONS]
--Frequency FREQUENCY --Year YEAR [--format {json,XML}]
[--csvfn CSVFN] [--splitkey SPLITKEY] [--xkey XKEY]
[--ykey YKEY] [--unitskey UNITSKEY] [--htmlfn HTMLFN]

get BEA NIPA data

options:
-h, --help show this help message and exit
--TableName TABLENAME
NIPA table name
--ShowMillions SHOWMILLIONS
NIPA show millions
--Frequency FREQUENCY
frequency M, Q, A or comma separated list
--Year YEAR year YYYY or X for all
--format {json,XML} query result format(json)
--csvfn CSVFN name of file to store dataset CSV result
--splitkey SPLITKEY table column name(LineDescription) to use to split the
plots
--xkey XKEY table column name(TimePeriod) to use to plot the data
--ykey YKEY table column name(DataValue) to use to plot the data
--unitskey UNITSKEY table column name(METRIC_NAME) to y label the plot
--htmlfn HTMLFN name of file to store dataset HTML result


##
## beaniud
##
usage: beaniud [-h] --TableName TABLENAME --Frequency FREQUENCY --Year YEAR
[--format {json,XML}] [--csvfn CSVFN] [--splitkey SPLITKEY]
[--xkey XKEY] [--ykey YKEY] [--unitskey UNITSKEY]
[--htmlfn HTMLFN]

get BEA NIUnderlyingDetail data

options:
-h, --help show this help message and exit
--TableName TABLENAME
NIUnderlyingDetail table name
--Frequency FREQUENCY
frequency M, Q, A or comma separated list
--Year YEAR year YYYY or X or all
--format {json,XML} query result format(json)
--csvfn CSVFN name of file to store dataset CSV result
--splitkey SPLITKEY table column name({'option_strings': ['--splitkey'],
'dest': 'splitkey', 'nargs': None, 'const': None,
'default': 'LineDescription', 'type': None, 'choices':
None, 'required': False, 'help': 'table column
name(%s) to use to split the plots', 'metavar': None,
'container': 0x100df7f20>, 'prog': 'beaniud'}) to use to split
the plots
--xkey XKEY table column name(TimePeriod) to use to plot the data
--ykey YKEY table column name(DataValue) to use to plot the data
--unitskey UNITSKEY table column name(METRIC_NAME) to y label the plot
--htmlfn HTMLFN name of file to store dataset HTML result


##
## bearegional
##
usage: bearegional [-h] --TableName TABLENAME --GeoFips GEOFIPS --LineCode
LINECODE --Year YEAR [--format {json,XML}]
[--csvfn CSVFN] [--splitkey SPLITKEY] [--xkey XKEY]
[--ykey YKEY] [--unitskey UNITSKEY] [--htmlfn HTMLFN]

get BEA Regional data

options:
-h, --help show this help message and exit
--TableName TABLENAME
table name
--GeoFips GEOFIPS geo fips
--LineCode LINECODE line code
--Year YEAR year YYYY or ALL
--format {json,XML} query result format(json)
--csvfn CSVFN name of file to store dataset CSV result
--splitkey SPLITKEY table column name(GeoName) to use to split the plots
--xkey XKEY table column name(TimePeriod) to use to plot the data
--ykey YKEY table column name(DataValue) to use to plot the data
--unitskey UNITSKEY table column name(CL_UNIT) to y label the plot
--htmlfn HTMLFN name of file to store dataset HTML result


##
## beaugdpbyind
##
usage: beaugdpbyind [-h] --TableID TABLEID --Industry INDUSTRY --Frequency
FREQUENCY --Year YEAR [--format {json,XML}]
[--csvfn CSVFN] [--splitkey SPLITKEY] [--xkey XKEY]
[--ykey YKEY] [--unitskey UNITSKEY] [--htmlfn HTMLFN]

get BEA UnderlyingGDPbyIndustry data

options:
-h, --help show this help message and exit
--TableID TABLEID table id
--Industry INDUSTRY industry
--Frequency FREQUENCY
frequency M, Q, A or comma separated list
--Year YEAR year YYYY or ALL
--format {json,XML} result format
--csvfn CSVFN name of file to store dataset CSV result
--splitkey SPLITKEY table column name(IndustrYDescription) to split the
plots
--xkey XKEY table column name(Year) to use to plot the data
--ykey YKEY table column name(DataValue) to use to plot the data
--unitskey UNITSKEY name(Billions?) to y label the plot
--htmlfn HTMLFN name of file to store dataset HTML result


##
## beaqueryq
##
usage: beaqueryq [-h]
[--DatasetName {NIPA,NIUnderlyingDetail,MNE,FixedAssets,ITA,IIP,InputOutput,IntlServTrade,IntlServSTA,GDPbyIndustry,Regional,UnderlyingGDPbyIndustry,APIDatasetMetaData}]
[--TableName TABLENAME] [--TableID TABLEID]
[--SeriesID SERIESID] [--ShowMillions SHOWMILLIONS]
[--Frequency FREQUENCY] [--Year YEAR]
[--DirectionOfInvestment {inward,outward,parent,state}]
[--Classification CLASSIFICATION] [--Industry INDUSTRY]
[--Country COUNTRY] [--Indicator INDICATOR]
[--AreaOrCountry AREAORCOUNTRY]
[--TypeOfInvestment TYPEOFINVESTMENT]
[--Component COMPONENT] [--TypeOService TYPEOSERVICE]
[--TradeDirection TRADEDIRECTION]
[--Affiliation AFFILIATION] [--Channel CHANNEL]
[--Destination DESTINATION] [--GeoFips GEOFIPS]
[--LineCode LINECODE] [--csvfn CSVFN]
[--splitkey SPLITKEY] [--xkey XKEY] [--ykey YKEY]
[--unitskey UNITSKEY] [--htmlfn HTMLFN]
[--format {json,XML}] [--hierarchy] [--tableregister]

get BEA data

options:
-h, --help show this help message and exit
--DatasetName {NIPA,NIUnderlyingDetail,MNE,FixedAssets,ITA,IIP,InputOutput,IntlServTrade,IntlServSTA,GDPbyIndustry,Regional,UnderlyingGDPbyIndustry,APIDatasetMetaData}
dataset name
--TableName TABLENAME
NIPA NIUnderlyingDetail FixedAssets Regional table
name
--TableID TABLEID InputOutput GDPbyIndustry UnderlyingGDPbyIndustry
table id
--SeriesID SERIESID MNE series id
--ShowMillions SHOWMILLIONS
NIPA show millions
--Frequency FREQUENCY
frequency M, Q, A or comma separated list
--Year YEAR year YYYY X or all
--DirectionOfInvestment {inward,outward,parent,state}
MNE direction of investment
--Classification CLASSIFICATION
MNE classification
--Industry INDUSTRY MNE IntlServSTA GDPbyIndustry UnderlyingGDPbyIndustry
Industry
--Country COUNTRY MNE country
--Indicator INDICATOR
ITA indicator
--AreaOrCountry AREAORCOUNTRY
ITA IntlServTrade IntlServSTA area or country
--TypeOfInvestment TYPEOFINVESTMENT
IIP type of investment
--Component COMPONENT
IIP component
--TypeOService TYPEOSERVICE
IntlServTrade type of service
--TradeDirection TRADEDIRECTION
IntlServTrade trade direction
--Affiliation AFFILIATION
IntlServTrade affiliation
--Channel CHANNEL IntlServSTA channel
--Destination DESTINATION
IntlServSTA destination
--GeoFips GEOFIPS Regional geo FIPS
--LineCode LINECODE Regional line code
--csvfn CSVFN name of file to store dataset CSV result
--splitkey SPLITKEY table column name to use to split the table
--xkey XKEY table column name to use to plot the data
--ykey YKEY table column name to use to plot the data
--unitskey UNITSKEY table column name to use to label the data
--htmlfn HTMLFN name of file to store dataset HTML result
--format {json,XML} query result format
--hierarchy BEA data model
--tableregister get NIPA table register

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

beaquery-0.0.20.tar.gz (362.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

beaquery-0.0.20-py3-none-any.whl (368.6 kB view details)

Uploaded Python 3

File details

Details for the file beaquery-0.0.20.tar.gz.

File metadata

  • Download URL: beaquery-0.0.20.tar.gz
  • Upload date:
  • Size: 362.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for beaquery-0.0.20.tar.gz
Algorithm Hash digest
SHA256 6f5fd1ab82d4ef6bfe1c2b32cb808172ac7789987c7846ea00d2d46f18df5f3b
MD5 5f95f74f12b75e09d16eb406f036d348
BLAKE2b-256 392a3d134e4d8276ed2157fa04488a054bbbfcc64cf7a69d0081d7b85492e50e

See more details on using hashes here.

File details

Details for the file beaquery-0.0.20-py3-none-any.whl.

File metadata

  • Download URL: beaquery-0.0.20-py3-none-any.whl
  • Upload date:
  • Size: 368.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for beaquery-0.0.20-py3-none-any.whl
Algorithm Hash digest
SHA256 bef6d8258301486f3eec8fbfea246f2662fa826dbf202626d37e4a5a55b653c5
MD5 9f41ef66f20772e90e69a1ab0f2ee2b0
BLAKE2b-256 61bda606ccb6fd2450f8ed4f2e2850d92db4958ba3d25136929b33bb9e7d73d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page