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.21.tar.gz (211.2 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.21-py3-none-any.whl (224.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: beaquery-0.0.21.tar.gz
  • Upload date:
  • Size: 211.2 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.21.tar.gz
Algorithm Hash digest
SHA256 6894a479f855d83d16307cc4b16434d47484db671feb8e7b002bdf4845e57da2
MD5 a6bc64ff957702b549f6cad245bef52c
BLAKE2b-256 ab77c389c59e7d58421be7138737e11f2bd3258ffc2be82a55d42e03530f40a1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: beaquery-0.0.21-py3-none-any.whl
  • Upload date:
  • Size: 224.6 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.21-py3-none-any.whl
Algorithm Hash digest
SHA256 226bcf4a275cd2f73047637eb26571b4f09503109cec274d6cd2591e9cc77978
MD5 b8266674f72ac87afac4d5e8a37773c7
BLAKE2b-256 b973723761dac9cb499149ba92eb6afc4a52d72006144031bbc66200440819e6

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