Skip to content

Conversation

courtneymyers
Copy link
Collaborator

Updates the way PM2.5 displacement data is calculated, and adds in VOCs and NH3 to web app's output. Displacement data for all three of those pollutants (PM2.5, VOCs, and NH3) are calculated from each RDF's heat data, and annual point-source data from the National Emissions Inventory.

(actually renaming 'pollutants' to 'metrics' as 'generation' isn't a pollutant)
function to parse and pass nei JSON data if the metric is 'nei'
…llers,

and update displacement API routes to include 'displacement' in URL
update getDisplacement() calculation to return data in a shape that's better suited for returning calculated data for multiple pollutants (for NEI pollutants), and update client app to work with new shape of returned data in displacement reducer
to account for passed 'nei' metric and properly calculate and return displacement data for pm2.5, vocs, and nh3
to correctly account for pollutants that aren't included in 'replacement' condition (e.g. 'vocs' and 'nh3' for now, but soon 'pm25' as its now calculated from NEI data, and not data in an RDF)
as its displacement value is calculated from NEI data now, and not pm2.5 data in the RDFs
and remove 'replacedOriginal' and 'replacedPostEere' values from setting pm25 original and post eere, as it's not longer eligible for replacement, since its value is calculated from NEI factors for each EGU
and update table styles (display units smaller, and wrap table in a container w/ its overflow css property set to scroll, to accommodate tables who's contents are too wide for their container...e.g. EmissionsTable
to only loop through hours and eeres once when the provided 'metric' parameter is 'nei' (cuts calculation time in a third for that 'metric')
(and not always rounding up as we were previously doing)
and display it in the DisplacementsTable component
and add tooltips explaining what ozone season is
(better named variables, more informative comments)
to support debugging hourly data for each EGU (NOTE: not used in production – only used for local development to test calculated hourly values for each EGU)
to debug a specific EGU instead of debugging all EGUs
(generated from latest Excel file)
to not trigger the browser's popup blocking, by opening a new tab immediately, and redirecting it to the correct COBRA app URL once the COBRA API is ready
and logic for formatting data for submission to COBRA API
to check returned COBRA API version number when determining if the COBRA API is ready for AVERT integration
(so if the COBRAConnection isn't ready to be displayed, due to the COBRA API not being ready, the heading also isn't shown...the DataDownload component is always shown, but moved the header into it to be consistent)
response to determine if the COBRA integration should be displayed (and not require the version API endpoint at all). Also simplify fetch error handling to return inner fecth and only catch/handle all errors at the top level fetch, as we're handling them all the same with the same error message.
@courtneymyers courtneymyers merged commit a2f1fc7 into master Sep 28, 2021
@courtneymyers courtneymyers deleted the feature/update-app-to-support-new-pollutants branch September 28, 2021 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant