-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from USEPA/import_factors
Import factors
- Loading branch information
Showing
103 changed files
with
90,484 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import_factors_exio/*__pycache__* | ||
import_factors_exio/mrio_models/* | ||
import_factors_exio/processed_mrio_resources/* | ||
import_factors_exio/output/* | ||
import_factors_exio/response_data/* | ||
import_factors_exio/API/*API_key.yaml | ||
!import_factors_exio/output/*import_factors_exio_2019* | ||
!import_factors_exio/output/aggregate* | ||
!import_factors_exio/output/import_shares_2019* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
author: US Bureau of Economic Analysis | ||
source_name: International Services | ||
source_url: https://www.bea.gov/data/intl-trade-investment/international-trade-goods-and-services | ||
bib_id: BEA | ||
api_name: BEA | ||
api_key_required: True | ||
format: [json,xml] | ||
url: | ||
base_url: https://apps.bea.gov/api/data/? | ||
url_params: | ||
Affiliation: AllAffiliations | ||
method: GetData | ||
DataSetName: IntlServTrade | ||
TradeDirection: Imports | ||
ResultFormat: json | ||
AreaOrCountry: __areaorcountry__ | ||
Year: __year__ | ||
years: | ||
- 2012 | ||
- 2013 | ||
- 2014 | ||
- 2015 | ||
- 2016 | ||
- 2017 | ||
- 2018 | ||
- 2019 | ||
- 2020 | ||
- 2021 | ||
- 2022 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
author: US Census Bureau | ||
source_name: USA Data | ||
source_url: https://usatrade.census.gov/ | ||
bib_id: Census | ||
api_key_required: False | ||
format: json | ||
url: | ||
base_url: http://api.census.gov/data/timeseries/intltrade/imports/naics? | ||
url_params: | ||
get: NAICS,GEN_CIF_YR,CTY_CODE | ||
COMM_LVL: NA6 | ||
CTY_CODE: __areaorcountry__ | ||
YEAR: __year__ | ||
MONTH: "12" | ||
years: | ||
- 2012 | ||
- 2013 | ||
- 2014 | ||
- 2015 | ||
- 2016 | ||
- 2017 | ||
- 2018 | ||
- 2019 | ||
- 2020 | ||
- 2021 | ||
- 2022 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Generating Import Emission Factors from Exiobase | ||
To generate import emission factors from exiobase, run the script [generate_import_factors.py](generate_import_factors.py) | ||
|
||
For each year, the following files are generated: | ||
|
||
- *US_detail_import_factors_exio_{year}.csv*: Single set of import factors for the US by detail sector. | ||
- *US_summary_import_factors_exio_{year}.csv*: Single set of import factors for the US by summary sector. | ||
- *Regional_detail_import_factors_exio_{year}.csv*: Import factors for each of seven regions, by detail sector, | ||
- *Regional_summary_import_factors_exio_{year}.csv*: Import factors for each of seven regions, by summary sector, | ||
- *import_shares_{year}.csv*: Provides the contribution to sector imports by country | ||
- *multiplier_df_exio_{year}.csv*: Full dataframe with emission factors and contributions by region and sector. | ||
|
||
File names are appended with the BEA schema year, e.g., `_17sch`. | ||
|
||
## BEA API Access | ||
To make calls to BEA for service imports data (by BEA service category, country, and year), users must first register at https://apps.bea.gov/api/signup/. | ||
After doing so, users will be provided with an API key to the provided email. | ||
Store this as 'BEA_API_key.yaml' in the API subfolder of the import_factors_exio directory. | ||
|
||
## Package requirements | ||
- pandas | ||
- esupy | ||
- fedelemflowlist | ||
- [currencyconverter](https://pypi.org/project/CurrencyConverter/) | ||
- pymrio |
69 changes: 69 additions & 0 deletions
69
import_factors_exio/concordances/BEA_service_to_useeio2_sector_concordance.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
BEA Service,API BEA Service,BEA_Detail_2012,BEA_Detail_2017 | ||
Maintenance and repair services n.i.e.,MaintenanceAndRepairNie,811100,811100 | ||
Maintenance and repair services n.i.e.,MaintenanceAndRepairNie,811200,811200 | ||
Maintenance and repair services n.i.e.,MaintenanceAndRepairNie,811300,811300 | ||
Maintenance and repair services n.i.e.,MaintenanceAndRepairNie,811400,811400 | ||
Transport,Transport,481000,481000 | ||
Transport,Transport,492000,492000 | ||
Insurance services,Insurance,524113,524113 | ||
Insurance services,Insurance,5241XX,5241XX | ||
Insurance services,Insurance,524200,524200 | ||
Financial services,Financial,523A00,523A00 | ||
Financial services,Financial,523900,523900 | ||
Financial services,Financial,52A000,52A000 | ||
Financial services,Financial,522A00,522A00 | ||
"Telecommunications, computer, and information services",TelecomCompAndInfo,517110,517110 | ||
"Telecommunications, computer, and information services",TelecomCompAndInfo,517210,517210 | ||
"Telecommunications, computer, and information services",TelecomCompAndInfo,517A00,517A00 | ||
"Telecommunications, computer, and information services",TelecomCompAndInfo,541511,541511 | ||
"Telecommunications, computer, and information services",TelecomCompAndInfo,541512,541512 | ||
"Telecommunications, computer, and information services",TelecomCompAndInfo,54151A,54151A | ||
"Telecommunications, computer, and information services",TelecomCompAndInfo,511200,511200 | ||
"Telecommunications, computer, and information services",TelecomCompAndInfo,518200,518200 | ||
"Telecommunications, computer, and information services",TelecomCompAndInfo,511110,511110 | ||
"Telecommunications, computer, and information services",TelecomCompAndInfo,511120,511120 | ||
"Telecommunications, computer, and information services",TelecomCompAndInfo,511130,511130 | ||
"Telecommunications, computer, and information services",TelecomCompAndInfo,5111A0,5111A0 | ||
"Telecommunications, computer, and information services",TelecomCompAndInfo,519130,519130 | ||
"Telecommunications, computer, and information services",TelecomCompAndInfo,5191A0,5191A0 | ||
Professional and management consulting services,ProfMgmtConsult,541800,541800 | ||
Professional and management consulting services,ProfMgmtConsult,561300,561300 | ||
Professional and management consulting services,ProfMgmtConsult,561700,561700 | ||
Professional and management consulting services,ProfMgmtConsult,561100,561100 | ||
Professional and management consulting services,ProfMgmtConsult,561200,561200 | ||
Professional and management consulting services,ProfMgmtConsult,561400,561400 | ||
Professional and management consulting services,ProfMgmtConsult,561500,561500 | ||
Professional and management consulting services,ProfMgmtConsult,561600,561600 | ||
Professional and management consulting services,ProfMgmtConsult,561900,561900 | ||
"Legal, accounting, management consulting, and public relations services",LegalAccountMgmtConsAndPubRel,541100,541100 | ||
"Legal, accounting, management consulting, and public relations services",LegalAccountMgmtConsAndPubRel,541200,541200 | ||
"Technical, trade-related, and other business services",TechTradeRelatedOth,541300,541300 | ||
"Technical, trade-related, and other business services",TechTradeRelatedOth,541610,541610 | ||
"Technical, trade-related, and other business services",TechTradeRelatedOth,5416A0,5416A0 | ||
"Technical, trade-related, and other business services",TechTradeRelatedOth,541400,541400 | ||
"Technical, trade-related, and other business services",TechTradeRelatedOth,5419A0,5419A0 | ||
"Technical, trade-related, and other business services",TechTradeRelatedOth,541920,541920 | ||
"Technical, trade-related, and other business services",TechTradeRelatedOth,541940,541940 | ||
"Technical, trade-related, and other business services",TechTradeRelatedOth,541700,541700 | ||
"Technical, trade-related, and other business services",TechTradeRelatedOth,562111,562000 | ||
"Technical, trade-related, and other business services",TechTradeRelatedOth,562HAZ,562000 | ||
"Technical, trade-related, and other business services",TechTradeRelatedOth,562212,562000 | ||
"Technical, trade-related, and other business services",TechTradeRelatedOth,562213,562000 | ||
"Technical, trade-related, and other business services",TechTradeRelatedOth,562910,562000 | ||
"Technical, trade-related, and other business services",TechTradeRelatedOth,562920,562000 | ||
"Technical, trade-related, and other business services",TechTradeRelatedOth,562OTH,562000 | ||
"Technical, trade-related, and other business services",TechTradeRelatedOth,213111,213111 | ||
"Technical, trade-related, and other business services",TechTradeRelatedOth,21311A,21311A | ||
"Personal, cultural, and recreational services",PersonalCulturalAndRecreational,711100,711100 | ||
"Personal, cultural, and recreational services",PersonalCulturalAndRecreational,711200,711200 | ||
"Personal, cultural, and recreational services",PersonalCulturalAndRecreational,711A00,711A00 | ||
"Personal, cultural, and recreational services",PersonalCulturalAndRecreational,711500,711500 | ||
"Personal, cultural, and recreational services",PersonalCulturalAndRecreational,712000,712000 | ||
"Personal, cultural, and recreational services",PersonalCulturalAndRecreational,512100,512100 | ||
"Personal, cultural, and recreational services",PersonalCulturalAndRecreational,512200,512200 | ||
"Personal, cultural, and recreational services",PersonalCulturalAndRecreational,611100,611100 | ||
"Personal, cultural, and recreational services",PersonalCulturalAndRecreational,611A00,611A00 | ||
"Personal, cultural, and recreational services",PersonalCulturalAndRecreational,611B00,611B00 | ||
Government goods and services n.i.e.,GovtGoodsAndServicesNie,491000,491000 | ||
Government goods and services n.i.e.,GovtGoodsAndServicesNie,S00101,S00101 | ||
Government goods and services n.i.e.,GovtGoodsAndServicesNie,S00102,S00102 |
Oops, something went wrong.