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.22.tar.gz (151.8 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.22-py3-none-any.whl (164.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for beaquery-0.0.22.tar.gz
Algorithm Hash digest
SHA256 68a505cc55abc1b614da128e1e6b95f54de1737ba74de13a0d8643a3584e48c6
MD5 807b87e3d738749bdc071c294e8b9c56
BLAKE2b-256 57ccb329942746458d61fd78779fb7ab9be8bd031c04487f17bc8d1c8fe91b78

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for beaquery-0.0.22-py3-none-any.whl
Algorithm Hash digest
SHA256 0eec70d3edb61de3b71939a97b070b7e0cc9d4f3043fa9757e00eed933e8cfbd
MD5 6e9fc5b02b68192f062c31614ad59a8c
BLAKE2b-256 7c62c806a29212c9a89f866a9ce042a07621a5adb508a9fbeec43b24617002c8

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