You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updated both Livestock Enteric Fermentation and Manure Management.
Since 2023 emi data is at state-level, we disaggregated the state-level data to county-level based on 2022 proportions. Not all V4 (2023) state-level data used the same categories as V3 (2012-2022) data, so a process was used to break emis down to base form before aggregating/disaggregating. The process is defined below:
Calculate 2012-2022 county-level emissions using V3 data
Calculate 2022 county-level proportions using V3 data with V4 categories
Read in 2023 state-level emissions using V4 data
Apply 2022 county-level proportions to 2023 state-level emissions to get 2023 county-level emissions
Append 2012-2022 county-level emissions with 2023 county-level emissions
Effectively, this broke down emis, filtered for the relevant emis to create proportions, applied proportions to new data, and appended emis to report 2012-2023.
config.py: Updated V3_Paths to V4_Paths, updated max_year to 2023, and changed load_road_globals to v4_paths. utils.py: added import box; updated road_globals v4_paths and functions
Emis Scripts
task_abandoned_coal_emis.py: Updated V4_Path, changed skip rows parameter. task_abandoned_og_wells_emi.py: Updated V4_Path and file names, removed unnecessary pd.read_excel parameters, made Pytask. task_anaerobic_digestion_emi.py: Updated file paths and function parameters. task_carbides_emis.py: Updated file paths and function parameters. task_coal_surf_emi.py: Updated file paths and function parameters. task_coal_under_emi.py: Updated file paths and function parameters. task_composting_emi.py: Updated file paths and function parameters. GHGI file uses georef (instead of state in V3), updated script. task_dom_wastewater_emi..py: Updated file paths and function parameters. task_ferro_emi.py: Updated file paths and function parameters. Added code to remove empty states. task_field_burning_emi.py: Updated file paths and function parameters. task_floded_lands_emi.py: Updated file paths and function parameters. task_forest_land_emi.py: Updated file paths and function parameters. task_grassland_emi.py: Updated file paths and function parameters. task_ind_wastewater_emi.py: Updated file paths and function parameters. task_iron_steel_emi.py: Updated file paths and function parameters. task_livestock_enteric_fermentation.py: Updated file paths and function parameters. Added Notes. Removed AK & HI. Created 2023 code (2012-2022 code uses previous code). Commented out Test code. task_livestock_manure_management.py: Updated file paths and function parameters. Added Notes. Removed AK & HI. Created 2023 code (2012-2022 code uses previous code). Commented out Test code. task_mobile_comb_emi.py: Updated file paths and function parameters. Updated source for V4. task_oil_gas_emi.py: Uses Hannah's crosswalk excel doc to map oil/gas emissions generation. task_petrochemicals_emis.py: Updated file paths and function parameters. task_rice_emi.py: Updated file paths and function parameters. task_stat_comb_emi.py: Updated file paths and function parameters. Added lines 84-86: Query for Residential & Biomass fuel type.
Proxy Scripts
global_data/task_download_breweries.py: Original code for downloading brewery data/locations. Can be used separate from domestic wastewater proxy code. task_abandoned_coal_proxy.py: Updated file paths and function parameters. Updated source for V4. Added ratio to skip_row_list at line 166. Removed ZipFile opening at line 222 since mines is stored as .txt (this may have been updated back to zip file). task_anaerobic_digestion.py: Updated file paths and function parameters. Updated source for V4. Made Pytask return None to prevent failure. task_carbides_proxy.py: Updated file paths and function parameters. Updated source for V4. task_coal_surface_and_under_proxy.py: Updated file paths and function parameters. Updated source for V4. Added num of mines from inventory notebook (line 116). Removed ZipFile opening at line 270 since mines is stored as .txt (this may have been updated back to zip file). task_coastal_wetlands_proxy.py: Updated file paths and function parameters. Updated source for V4. This is Express; however, the paths were updated. task_comb_mob_mines.py: Updated file paths and function parameters. Updated source for V4. Removed ZipFile opening at line 44 since mines is stored as .txt (this may have been updated back to zip file). task_composting_proxy.py: Updated file paths and function parameters. Updated source for V4. This is Express; however, the paths were updated. task_dask_import_allroads.py: Updated file paths and function parameters. Updated source for V4. Added Progress, Failed, Success, and Retry log files. Added functions to process in batches. task_iron_steel_proxy.py: Updated file paths and function parameters. Updated source for V4. Added flexible GHGRP Subpart Q read in that either loads file from dir or downloads with API. task_livestock_proxy.py: Updated file paths and function parameters. Updated source for V4. This is Express; however, the paths were updated. task_mob_comb_railroads_proxy.py: Updated file paths and function parameters. Updated source for V4. This is Express; however, the paths were updated. task_peatlands_proxy.py: Updated file paths and function parameters. Updated source for V4. This is Express; however, the paths were updated. task_petrochemicals_proxy.py: Updated file paths and function parameters. Updated source for V4. Line 75: update usecols. Line 99: added capacity.33 for 2023. Line 105: adjusted dropna year range. Added flexible read in for GHGRP subpart X (either reads from dir or downloads with API if file does not exist). Line 182: added column for next year. task_raods_proxy.py: Updated file paths and function parameters. Updated source for V4. This is Express; however, the paths were updated. Updated column headers (were previously incorrect for creating NEW files). Previous code checked if files existed (they did) and continued, so code was updated to generate 2023 data. Line 293: Changed join() to merge(). Line 466: Change groupby logic for out_ds. Line 500: Flip Y-axis. task_stat_comb_proxy.py: Updated file paths and function parameters. Updated source for V4. task_wastewater_proxy.py: Updated file paths and function parameters. Updated source for V4. This is Express; however, the paths were updated. Line 1211: process all industries and unpack individual variables. Line 1244: changed state_name to state. Left in testing data.
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updated both Livestock Enteric Fermentation and Manure Management.
Since 2023 emi data is at state-level, we disaggregated the state-level data to county-level based on 2022 proportions. Not all V4 (2023) state-level data used the same categories as V3 (2012-2022) data, so a process was used to break emis down to base form before aggregating/disaggregating. The process is defined below:
Effectively, this broke down emis, filtered for the relevant emis to create proportions, applied proportions to new data, and appended emis to report 2012-2023.