Create variable aqiwdpm2_5

Process Step

Description Compute target variable ‘aqiwdpm2_5’ starting from variables ‘Concentration’ and ‘AirPollutant = PM2.5’ for each background station. Compute where ‘AirQualityStation’ has values for the pollutant. Find ‘Concentration’ value at the 99th percentile for the pollutant. Create EEA Air Quality Index where PM2.5: 0 to 10 eq ‘Good’ represented by value ‘0’; 10 to 20 eq ‘Fair’ represented by value ‘1’; 20 to 25 eq ‘Moderate’ represented by value ‘2’; 25 to 50 eq ‘Poor’ represented by value ‘3’; 50 to 75 eq ‘Very Poor’ represented by value ‘4’; 75 to 800 eq ‘Extremely poor’ represented by value ‘5’. The worst air quality level measured on a specific day on one of the background stations in the region provides values to the variable.

This step uses a script written in Python3.


Diagram of the Process Step

digraph Diagram { graph [ stylesheet="../_static/custom.css" fontnames = "svg" # "... rock solid standards compliant SVG", see: https://graphviz.org/faq/font/#what-about-svg-fonts rankdir="LR" nodesep="0.15" tooltip=" " ]; node [ fontname="sans-serif" ]; Step [ shape="rect" style="filled, rounded" width="3" height="0.8" fontcolor="white" fillcolor="#4363d8" fontsize="13pt" label="Create variable aqiwdpm2_5\n(current process step)" tooltip=" " ]; # input parameter parameter_1b87f6c7_d1ce_4321_8e76_f94a16e780b6 [ shape="rect" style="filled" width="2" height="0.1" fontcolor="blue" fontsize="10pt" URL="https://ess-search.nsd.no/en/variable/fd2f98ae-4b0c-4f48-b5da-b7036536102a" target="_blank" label=<<i>Variable AirQualityStation:</i><br/>Localid of the station> tooltip="Input parameter for current process step" fillcolor="#ffe119" ]; parameter_1b87f6c7_d1ce_4321_8e76_f94a16e780b6:e -> Step:w [ minlen="2" ]; parameter_2eddc4ae_156e_4b85_8449_09487a26c0a0 [ shape="rect" style="filled" width="2" height="0.1" fontcolor="blue" fontsize="10pt" URL="https://ess-search.nsd.no/en/variable/2cd960f7-3d9a-4aa2-bf34-b40ccaa239e1" target="_blank" label=<<i>Variable AirPollutant:</i><br/>Short name of the pollutant> tooltip="Input parameter for current process step" fillcolor="#ffe119" ]; parameter_2eddc4ae_156e_4b85_8449_09487a26c0a0:e -> Step:w [ minlen="2" ]; parameter_1c576b4d_0eaa_4542_8c17_4b74ff1a854b [ shape="rect" style="filled" width="2" height="0.1" fontcolor="blue" fontsize="10pt" URL="https://ess-search.nsd.no/en/variable/9458698a-abc5-4907-b542-b5e9d741ad00" target="_blank" label=<<i>Variable Concentration:</i><br/>The measured<br/>value/concentration> tooltip="Input parameter for current process step" fillcolor="#ffe119" ]; parameter_1c576b4d_0eaa_4542_8c17_4b74ff1a854b:e -> Step:w [ minlen="2" ]; parameter_7d6e0e95_572c_40a5_82e4_bc51a2a68c77 [ shape="rect" style="filled" width="2" height="0.1" fontcolor="blue" fontsize="10pt" URL="https://ess-search.nsd.no/en/variable/c9ae5e2b-376b-436d-abd8-f86879f8dc45" target="_blank" label=<<i>Variable date:</i><br/>Date> tooltip="Input parameter for current process step" fillcolor="#ffe119" ]; parameter_7d6e0e95_572c_40a5_82e4_bc51a2a68c77:e -> Step:w [ minlen="2" ]; # previous step step_70b92d2b_cc0a_44a7_9b1b_1e84084f4c50 [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable date" URL="../step_70b92d2b-cc0a-44a7-9b1b-1e84084f4c50.html" target="_parent" tooltip="Previous process step:\nUse variables 'DatetimeBegin' and 'DatetimeEnd' to create variable 'date'." ]; step_70b92d2b_cc0a_44a7_9b1b_1e84084f4c50:e -> parameter_7d6e0e95_572c_40a5_82e4_bc51a2a68c77:w [ minlen="2" ]; parameter_87419b24_5963_48e7_8db9_0c6edf44bce6 [ shape="rect" style="filled" width="2" height="0.1" fontcolor="blue" fontsize="10pt" URL="https://ess-search.nsd.no/en/variable/99d07034-b859-4c28-801e-6accb5e9f9da" target="_blank" label=<<i>Variable region:</i><br/>Region> tooltip="Input parameter for current process step" fillcolor="#ffe119" ]; parameter_87419b24_5963_48e7_8db9_0c6edf44bce6:e -> Step:w [ minlen="2" ]; # output parameter parameter_046a6012_3f1e_4945_8e57_7d24b4b9a73f [ shape="rect" style="filled" width="2" height="0.1" fontcolor="blue" fontsize="10pt" URL="https://ess-search.nsd.no/en/variable/48622b44-b269-4183-9bbc-af8c6885252a" target="_blank" label=<<i>Variable aqiwdpm2_5:</i><br/>Worst air quality index<br/>level PM2.5, date> tooltip="Output parameter for current process step" fillcolor="#dcbeff" ]; Step:e -> parameter_046a6012_3f1e_4945_8e57_7d24b4b9a73f:w [ minlen="2" ]; # following step step_cdb34f49_1977_4a9f_bc6b_2db89292442d [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable aqiwd" URL="../step_cdb34f49-1977-4a9f-bc6b-2db89292442d.html" target="_parent" tooltip="Following process step:\nCompute target variable 'aqiwd' based on 'aqiwdpm10'; 'aqiwdpm2_5'; 'aqiwdso2'; 'aqiwdno2; 'aqiwdo3' by date and region. The maximum value across the source variables becomes the value of the target variable" ]; parameter_046a6012_3f1e_4945_8e57_7d24b4b9a73f:e -> step_cdb34f49_1977_4a9f_bc6b_2db89292442d:w [ minlen="2" ]; # following step step_e21b1e54_18a0_4296_af9d_0b0eb9762cc7 [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable aqiw2dpm2_5" URL="../step_e21b1e54-18a0-4296-af9d-0b0eb9762cc7.html" target="_parent" tooltip="Following process step:\nCompute target variable 'aqiw2dpm2_5' based on 'aqiwdpm2_5', 'region' and 'date'. The worst value for the pollutant across a date and the date before becomes the value of the target variable" ]; parameter_046a6012_3f1e_4945_8e57_7d24b4b9a73f:e -> step_e21b1e54_18a0_4296_af9d_0b0eb9762cc7:w [ minlen="2" ]; # following step step_6a2f8d7e_5fc9_44e5_bf60_71a91c3614c6 [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable ndyprwpm2_5" URL="../step_6a2f8d7e-5fc9-44e5-bf60-71a91c3614c6.html" target="_parent" tooltip="Following process step:\nCompute target variable 'ndyprwpm2_5' based on 'aqiwdpm2_5', 'region' and 'date'. The number of days during the last seven days from date, date included, where 'aqiwdpm2_5' = '3' 'Poor' or 'aqiwdpm2_5' = '4' 'Very poor' or 'aqiwdpm2_5' = '5' 'Extremely poor' becomes the value of the target variable" ]; parameter_046a6012_3f1e_4945_8e57_7d24b4b9a73f:e -> step_6a2f8d7e_5fc9_44e5_bf60_71a91c3614c6:w [ minlen="2" ]; # following step step_3cf520d5_1d16_40a2_8a32_02eef2f9784b [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable ndyprw" URL="../step_3cf520d5-1d16-40a2-8a32-02eef2f9784b.html" target="_parent" tooltip="Following process step:\nCompute target variable 'ndyprw' based on 'aqiwdpm10', 'aqiwdpm2_5', 'aqiwdso2', 'aqiwdno2', 'aqiwdo3', 'region' and 'date'. The number of days during the last seven days from date, date included, where one or more of variables 'aqiwdpm10', 'aqiwdpm2_5', 'aqiwdso2r', 'aqiwdno2', 'aqiwdo3' has value '3' 'Poor' or '4' 'Very poor' or '5' 'Extremely poor' becomes the value of the target variable" ]; parameter_046a6012_3f1e_4945_8e57_7d24b4b9a73f:e -> step_3cf520d5_1d16_40a2_8a32_02eef2f9784b:w [ minlen="2" ]; # following step step_57cc0d7f_3df3_4c61_b0ce_4a3454a495cc [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable ndyprmpm2_5" URL="../step_57cc0d7f-3df3-4c61-b0ce-4a3454a495cc.html" target="_parent" tooltip="Following process step:\nCompute target variable 'ndyprmpm2_5' based on ' aqiwdpm2_5 ' , 'region' and 'date'. The number of days during the last thirty days from date, date included, where 'aqiwdpm2_5' = '3' 'Poor' or 'aqiwdpm2_5' = '4' 'Very poor' or 'aqiwdpm2_5' = '5' 'Extremely poor' becomes the value of the target variable" ]; parameter_046a6012_3f1e_4945_8e57_7d24b4b9a73f:e -> step_57cc0d7f_3df3_4c61_b0ce_4a3454a495cc:w [ minlen="2" ]; # following step step_4c6e7249_9c49_4140_a0d6_88bde940012e [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable ndyprm" URL="../step_4c6e7249-9c49-4140-a0d6-88bde940012e.html" target="_parent" tooltip="Following process step:\nCompute target variable 'ndyprm' based on 'aqiwdpm10', 'aqiwdpm2_5', 'aqiwdso2', 'aqiwdno2', 'aqiwdo3', 'region' and 'date'. The number of days during the last thirty days from date, date included, where one or more of variables 'aqiwdpm10r', 'aqiwdpm2_5r', 'aqiwdso2r', 'aqiwdno2r', 'aqiwdo3r' has value '3' 'Poor' or '4' 'Very poor' or '5' 'Extremely poor' becomes the value of the target variable" ]; parameter_046a6012_3f1e_4945_8e57_7d24b4b9a73f:e -> step_4c6e7249_9c49_4140_a0d6_88bde940012e:w [ minlen="2" ]; # following step step_12b1349d_eb60_46b6_9d5f_b7ee92e4e7af [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable ndyprypm2_5" URL="../step_12b1349d-eb60-46b6-9d5f-b7ee92e4e7af.html" target="_parent" tooltip="Following process step:\nCompute target variable 'ndyprypm2_5' based on 'aqiwdpm2_5', 'region' and 'date'. The number of days during the last three hundred and sixty five days from date, date included, where 'aqiwdpm2_5' = '3' 'Poor' or 'aqiwdpm2_5' = '4' 'Very poor' or 'aqiwdpm2_5' = '5' 'Extremely poor' becomes the value of the target variable" ]; parameter_046a6012_3f1e_4945_8e57_7d24b4b9a73f:e -> step_12b1349d_eb60_46b6_9d5f_b7ee92e4e7af:w [ minlen="2" ]; # following step step_7078715e_59f5_43e6_9c0c_ef5be032d9ee [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable ndypry" URL="../step_7078715e-59f5-43e6-9c0c-ef5be032d9ee.html" target="_parent" tooltip="Following process step:\nCompute target variable 'ndypry ' based on 'aqiwdpm10', 'aqiwdpm2_5', 'aqiwdso2', 'aqiwdno2', 'aqiwdo3', 'region' and 'date'. The number of days during the last three hundred and sixty five days from date, date included, where one or more of variables 'aqiwdpm10', 'aqiwdpm2_5', 'aqiwdso2', 'aqiwdno2', 'aqiwdo3' has value '3' 'Poor' or '4' 'Very poor' or '5' 'Extremely poor' becomes the value of the target variable" ]; parameter_046a6012_3f1e_4945_8e57_7d24b4b9a73f:e -> step_7078715e_59f5_43e6_9c0c_ef5be032d9ee:w [ minlen="2" ]; }


Hint

Move the mouse cursor over a parameter to see more information. Click on a parameter or a related step to go to the corresponding page.

Legend:

digraph Diagram { graph [ stylesheet="../_static/custom.css" fontnames = "svg" # "... rock solid standards compliant SVG", see: https://graphviz.org/faq/font/#what-about-svg-fonts rankdir="LR" bgcolor="#eeeeee" size="5,10!" nodesep=0.15 tooltip=" " ]; node [ fontname="sans-serif" ]; Step [ width="3" label="Process step" tooltip=" " shape="rect" style="filled, rounded" fontcolor="white" fillcolor="#4363d8" ]; # input parameter InputParameter [ shape="rect" width="2" height="0.1" style="filled" label="Input parameter" tooltip=" " fillcolor="#ffe119" ]; InputParameter -> Step [ label="used by" ]; OutputParameter [ shape="rect" width="2" height="0.1" style="filled" label="Output parameter" tooltip=" " fillcolor="#dcbeff" ]; Step -> OutputParameter [ label="produces" ]; }