|
|
(11 intermediate revisions by the same user not shown) |
Line 11: |
Line 11: |
|
| |
|
| == Rationale == | | == Rationale == |
| | |
| | === Data === |
|
| |
|
| Detailed data can be found from [[:heande:Buildings in Basel]]. This data is aggregated to the postal code level. The table uses Swiss Land Survey coordinates CH1903. [http://spatialreference.org/ref/epsg/21782/] [http://en.wikipedia.org/wiki/Swiss_coordinate_system] Use this code in the ova2spat function: | | Detailed data can be found from [[:heande:Buildings in Basel]]. This data is aggregated to the postal code level. The table uses Swiss Land Survey coordinates CH1903. [http://spatialreference.org/ref/epsg/21782/] [http://en.wikipedia.org/wiki/Swiss_coordinate_system] Use this code in the ova2spat function: |
| proj4string = "+init=epsg:21781" | | proj4string = "+init=epsg:21781" |
| | |
| | ==== Renovations ==== |
| | |
| | Estimates from Laura Perez and Stephan Trüeb, unibas.ch N:\YMAL\Projects\Urgenche\WP9 Basel\Energy_scenarios_Basel_update.docx |
| | |
| | <t2b name='Fraction of houses renovated per year' index="Age" obs="Result" desc="Description" unit= "%"> |
| | 0|0|Estimates from Laura Perez and Stephan Trüeb |
| | 20|0|Assumption Result applies to buildings older than the value in the Age column. |
| | 25|1| |
| | 30|1| |
| | 50|1| |
| | 100|1| |
| | 1000|1| |
| | </t2b> |
| | |
| | <t2b name='Popularity of renovation types' index='Renovation' obs='Fraction' desc='Description' unit='%'> |
| | None|0| |
| | Windows|65| |
| | Technical systems|30| |
| | Sheath reform|5| |
| | General|0| |
| | </t2b> |
| | |
| | ==== Emission locations ==== |
| | |
| | Where and how do the emissions of heating take place? |
| | |
| | <t2b name='Emission locations' index='Heating,Emission site,Emission height' obs='Dummy' unit='-'> |
| | District|4056|High|4056 is the postal code of the heat and power plant IWB, Hagenaustrasse 40/70 4056 Basel. |
| | Long-distance heating|4056|High| |
| | Electricity|4056|High| |
| | Geothermal|4056|High| |
| | Centrifuge, hydro-extractor|4056|High| |
| | Heating oil|At site of consumption|Ground| |
| | Wood|At site of consumption|Ground| |
| | Gas|At site of consumption|Ground| |
| | Coal|At site of consumption|Ground| |
| | Solar heater/ collector|At site of consumption|Ground| |
| | No energy source|At site of consumption|Ground| |
| | Other sources|At site of consumption|Ground| |
| | </t2b> |
|
| |
|
| <t2b name="Locations of postal codes" index="Postal code,X" obs="Y" unit="epsg:21781"> | | <t2b name="Locations of postal codes" index="Postal code,X" obs="Y" unit="epsg:21781"> |
Line 30: |
Line 73: |
| </t2b> | | </t2b> |
|
| |
|
| === Calculations === | | ==== Fuel use by heating type ==== |
|
| |
|
| ==== Initiation ====
| | Basel-specific data about connections between Heating and fuel usage. Generic data should be taken from [[Energy balance]]. |
|
| |
|
| This code creates ovariables that are needed to run the [[Building model]] and its ovariables buildings and heatingEnergy. | | <t2b name='Fuel use by heating type' index='Heating,Burner,Fuel' obs='Fraction' desc='Description' unit='-'> |
|
| | Long-distance heating|Large fluidized bed|Waste|0.5|The values are from Wikipedia for Basel. See below. |
| <rcode name="initiate" label="Initiate objects (developers only)" embed=1> | | Long-distance heating|Large fluidized bed|Wood|0.1| |
| library(OpasnetUtils)
| | Long-distance heating|Large fluidized bed|Gas|0.4| |
| | Long-distance heating|Grid|Electricity|0|This is geothermally-generated district heating. Note: the fraction you need electricity is ca. 0.3*the amount of geoheat produced. |
| | Coal|Large fluidized bed|Coal|1| |
| | </t2b> |
|
| |
|
| # [[Buildings in Basel]], building stock, locations by postal codes (in A Swiss coordinate system)
| | For guesstimates about Long-distance heating (which is used in Basel), see [[Climate change policies in Basel]] and [[:de:IWB]]. |
| stockBuildings <- Ovariable("stockBuildings", ddata = "Op_en7044.postal_code_areas")
| |
| colnames(stockBuildings@data)[colnames(stockBuildings@data) == "Eventyear"] <- "Time"
| |
|
| |
|
| # Geolocations of the buildings for emission calculations.
| | <rcode name="fuelShares" label="Initiate fuelShares (developers only)" embed=1> |
| emissionLocations <- Ovariable("emissionLocations", ddata = "Op_en7044.locations_of_postal_codes")
| |
| colnames(emissionLocations@data)[colnames(emissionLocations@data) == "emissionLocationsResult"] <- "Y"
| |
| emissionLocations@data$emissionLocationsResult <- 1
| |
|
| |
|
| ####### DEFINE DUMMIES FOR MODEL PROPERTIES THAT ARE NOT NEEDED FOR BASEL | | ## This code is Op_en7044/fuelShares on page [[Buildings in Basel]] |
|
| |
|
| construction <- Ovariable("construction", data = data.frame(
| | library(OpasnetUtils) |
| Postal.code = 4051,
| |
| Eventyear = 1871,
| |
| Building = "Residential buildings with subsidiary use",
| |
| Heating = "Electricity",
| |
| Result = 0
| |
| ))
| |
|
| |
|
| changeBuildings <- 0
| | fuelShares <- Ovariable("fuelShares", |
| obstime <- data.frame(Startyear = 2010)
| | dependencies = data.frame( |
| heating_before <- TRUE # Should heatingShares be calculated before renovate and timepoints (or after)?
| | Name = "fuelSharesgeneric", |
| efficiency_before <- TRUE # Should efficiencyShares be calculated before renovate and timepoints (or after)?
| | Ident = "Op_en5141/fuelSharesgeneric" # [[Energy balance]] |
| efficiencyShares <- Ovariable("efficiencies", data = data.frame(Efficiency = "New", Result = 1)) # Current efficiencies
| | ), |
| heatingShares <- 1 # Heating types of current buildings. Exists as part of buildingStock
| | formula = function(...) { |
| heatingSharesNew <- 0 # Heating types of the buildings in the future
| | |
| renovationRate <- 0 # Percentage of renovations per year
| | dat <- EvalOutput(Ovariable("dat", ddata = "Op_en7044", subset = "Fuel use by heating type")) # [[Buildings in Basel]] |
| renovationShares <- 0 # Fraction of renovation type when renovation is done. Renovations not considered.
| | colnames(dat@output) <- gsub("[ \\.]", "_", colnames(dat@output)) |
|
| |
|
| # Ovariables energyUse and savingPotential must be taken from [[Energy use of buildings]].
| | out <- combine(fuelSharesgeneric, dat, name = "fuelShares") |
| # obsyear, # Years for which observations are calculated. Must be given in an assessment.
| | out <- out * Ovariable(output = data.frame(Time = 1900:2080, Result = 1), marginal = c(TRUE, FALSE)) |
| | | out <- unkeep(out, prevresults = TRUE, sources = TRUE) |
| openv.setN(0)
| |
|
| |
|
| | return(out) |
| | } |
| | ) |
|
| |
|
| | objects.store(fuelShares) |
| | cat("Object fuelShares stored.\n") |
|
| |
|
| if(FALSE) {
| |
| objects.store(
| |
| buildingStock, # Current building stock
| |
| buildingTypes, # A dummy variable to combine two different indices: Building and Building2
| |
| construction, # Construction rate in the future
| |
| efficiencies, # Energy efficiencies of current buildings
| |
| efficienciesNew, # Energy efficiencies in the future
| |
| emissionLocations, # Locations of buildings
| |
| eventyear, # A dummy variable to combine time periods to numerical time axis.
| |
| heatingShares, # Heating types of current buildings
| |
| heatingSharesNew, # Heating types of the buildings in the future
| |
| renovation, # Percentage of renovations per year
| |
| renovationShares # Fraction of renovation type when renovation is done.
| |
| )
| |
|
| |
| cat("Objects
| |
| buildingStock, # Current building stock
| |
| buildingTypes, # A dummy variable to combine two different indices: Building and Building2
| |
| construction, # Construction rate in the future
| |
| efficiencies, # Energy efficiencies of current buildings
| |
| efficienciesNew, # Energy efficiencies in the future
| |
| emissionLocations, # Locations of buildings
| |
| eventyear, # A dummy variable to combine time periods to numerical time axis.
| |
| heatingShares, # Heating types of current buildings
| |
| heatingSharesNew, # Heating types of the buildings in the future
| |
| renovation, # Percentage of renovations per year
| |
| renovationShares # Fraction of renovation type when renovation is done.
| |
| stored.\n")
| |
| }
| |
| </rcode> | | </rcode> |
|
| |
|
| ==== Model ==== | | === Calculations === |
|
| |
|
| <rcode> | | This code creates ovariables that are needed to run the [[Building model]] and its ovariables buildings and heatingEnergy. |
| | |
| | <rcode name="initiate" label="Initiate objects (developers only)" embed=1> |
| library(OpasnetUtils) | | library(OpasnetUtils) |
|
| |
|
| openv.setN(0) # use medians instead of whole sampled distributions
| | # [[Buildings in Basel]], building stock, locations by postal codes (in A Swiss coordinate system) |
| | stockBuildings <- Ovariable("stockBuildings", ddata = "Op_en7044.postal_code_areas") |
| | colnames(stockBuildings@data)[colnames(stockBuildings@data) == "Built"] <- "Time" |
| | colnames(stockBuildings@data)[colnames(stockBuildings@data) == "Postal code"] <- "City_area" |
|
| |
|
| objects.latest("Op_en6007", code_name = "answer") # [[OpasnetUtils/Drafts]] findrest
| | # Construction rate is assumed to be 2 % /a from the year 2010 building stock. |
|
| |
|
| obstime <- data.frame(Startyear = 2012) # Observation years must be defined for an assessment.
| | changeBuildings <- stockBuildings |
| | changeBuildings@name <- "changeBuildings" |
| | colnames(changeBuildings@data)[colnames(changeBuildings@data) == "stockBuildingsResult"] <- "changeBuildingsResult" |
| | changeBuildings@data$changeBuildingsResult <- changeBuildings@data$changeBuildingsResult * 0.02 |
| | changeBuildings@data$Time <- NULL |
| | changeBuildings@data <- merge(changeBuildings@data, data.frame(Time = 2015 + 0:7 * 5)) |
|
| |
|
| ## Additional index needed in followup of ovariables efficiencyShares and stockBuildings | | # Geolocations of the buildings for emission calculations. OLD VERSION |
| | # emissionLocations <- Ovariable("emissionLocations", ddata = "Op_en7044.locations_of_postal_codes") |
| | # colnames(emissionLocations@data)[colnames(emissionLocations@data) == "emissionLocationsResult"] <- "Y" |
| | # emissionLocations@data$emissionLocationsResult <- 1 |
|
| |
|
| #year <- Ovariable("year", data = data.frame(
| | emissionLocations <- Ovariable("emissionLocations", ddata = "Op_en7044", subset = "Emission locations") |
| # Constructed = factor(
| | colnames(emissionLocations@data) <- gsub("[ \\.]", "_", colnames(emissionLocations@data)) |
| # c("1799-1899", "1900-1909", "1910-1919", "1920-1929", "1930-1939", "1940-1949",
| | emissionLocations@data$emissionLocationsResult <- 1 |
| # "1950-1959", "1960-1969", "1970-1979", "1980-1989", "1990-1999",
| |
| # "2000-2010", "2011-2019", "2020-2029", "2030-2039", "2040-2049"
| |
| # ),
| |
| # ordered = TRUE
| |
| # ),
| |
| # Time = c(1880, 1905 + 0:14 * 10),
| |
| # Result = 1
| |
| #))
| |
|
| |
|
| BS <- 24
| | heatingShares <- 1 # This is already in the Basel data. |
| heating_before <- TRUE
| |
| efficiency_before <- TRUE
| |
|
| |
|
| ###################### Decisions
| | renovationRate <- Ovariable('renovationRate', |
| | | dependencies = data.frame(Name = "dummy"), |
| decisions <- opbase.data('Op_en5461', subset = "Decisions") # [[Climate change policies and health in Kuopio]]
| | formula = function(...) { |
| | | temp <- tidy(opbase.data('Op_en7044', subset = 'Fraction of houses renovated per year')) |
| DecisionTableParser(decisions)
| | temp$Age <- round(as.numeric(as.character(temp$Age))) |
| | | out <- as.data.frame(approx( |
| # Remove previous decisions, if any.
| | temp$Age, |
| rm(
| | temp$Result, |
| "buildings",
| | n = (max(temp$Age) - min(temp$Age) + 1), |
| "stockBuildings",
| | method = "constant" |
| "changeBuildings",
| | )) |
| "efficiencyShares",
| | colnames(out) <- c("Age", "renovationRateResult") |
| "energyUse",
| | out$renovationRateResult <- out$renovationRateResult / 100 |
| "heatingShares",
| | out <- Ovariable("renovationRate", output = out, marginal = c(TRUE, FALSE)) |
| "renovationShares",
| | return(out) |
| "renovationRate",
| | } |
| "fuelShares",
| |
| "year",
| |
| envir = openv | |
| ) | | ) |
|
| |
|
| ############################ City-specific data
| | renovationShares <- Ovariable("renovationShares", |
| | dependencies = data.frame(Name = "dummy"), |
| | formula = function(...) { |
| | out <- Ovariable("raw", ddata = 'Op_en7044', subset = 'Popularity of renovation types') |
| | out <- findrest((out), cols = "Renovation", total = 100) / 100 |
|
| |
|
| ####!------------------------------------------------
| | renovationyear <- Ovariable("renovationyear", data = data.frame( |
| objects.latest("Op_en5417", code_name = "initiate") # [[Population of Kuopio]]
| | Obsyear = factor(c(2020, 2030, 2040, 2050)), |
| # population: City_area
| | Result = 1 |
| # objects.latest("Op_en5932", code_name = "initiate") # [[Building stock in Kuopio]] Building ovariables:
| | )) |
| objects.latest("Op_en7044", code_name = "initiate") # [[Buildings in Basel]]
| |
| # buildingStock: Building, Constructed, City_area
| |
| # rateBuildings: Age, (RenovationPolicy)
| |
| # renovationShares: Renovation
| |
| # construction: Building
| |
| # constructionAreas: City_area
| |
| # buildingTypes: Building, Building2
| |
| # heatingShares: Building, Heating, Eventyear
| |
| # heatingSharesNew: Building2, Heating
| |
| # eventyear: Constructed, Eventyear
| |
| # efficiencyShares: Time, Efficiency
| |
| head(renovationRate@output)
| |
| head(renovationRate@data)
| |
| renovationRate <- EvalOutput(renovationRate) * 5 # Rates for 5-year periods
| |
| renovationRate@name <- "renovationRate" # This is needed for CheckDecisions
| |
| renovationRate@output$renovationRateResult <- renovationRate@output$Result
| |
| renovationRate@output$Result <- NULL
| |
|
| |
|
| #################### Energy use (needed for buildings submodel) | | out <- out * renovationyear # renovation shares repeated for every potential renovation year. |
|
| |
|
| ####!------------------------------------------------
| | out@output$Renovation <- factor(out@output$Renovation, levels = c( |
| objects.latest("Op_en5488", code_name = "initiate") # [[Energy use of buildings]]
| | "None", |
| # energyUse: Building, Heating
| | "General", |
| # efficiencyShares: Efficiency, Constructed
| | "Windows", |
| # renovationRatio: Efficiency, Building2, Renovation
| | "Technical systems", |
| ####i------------------------------------------------
| | "Sheath reform" |
| | ), ordered = TRUE) |
|
| |
|
| ###################### Actual building model
| | return(out) |
| # The building stock is measured as m^2 floor area.
| | } |
| | ) |
|
| |
|
| ####!------------------------------------------------
| | dummy <- 1 |
| objects.latest("Op_en6289", code_name = "initiate") # [[Building model]] # Generic building model.
| |
| # buildings: formula-based
| |
| # heatingEnergy: formula-based
| |
| ####i------------------------------------------------
| |
|
| |
|
| buildings <- EvalOutput(buildings, verbose = TRUE)
| | objects.store( |
| | | stockBuildings, # Current building stock |
| buildings@output$RenovationPolicy <- factor( | | changeBuildings, # Building stock change per year |
| buildings@output$RenovationPolicy, | | emissionLocations, # Locations of buildings and emissions |
| levels = c("BAU", "Active renovation", "Effective renovation"), | | heatingShares, # Heating types of current buildings |
| ordered = TRUE | | renovationRate, # Percentage of renovations per year |
| | renovationShares, # Fraction of renovation type when renovation is done. From [[Building stock in Kuopio]] |
| | dummy # Needed by renovationShares |
| ) | | ) |
|
| |
|
| buildings@output$EfficiencyPolicy <- factor(
| | cat("Objects |
| buildings@output$EfficiencyPolicy,
| | stockBuildings, |
| levels = c("BAU", "Active efficiency"),
| | changeBuildings, |
| ordered = TRUE | | emissionLocations, |
| )
| | heatingShares, |
| | | renovationRate, |
| bui <- oapply(buildings * 1E-6, cols = c("City_area", "buildingsSource"), FUN = sum)@output
| | renovationShares |
| colnames(bui)
| | stored.\n") |
| ggplot(subset(bui, EfficiencyPolicy == "BAU"), aes(x = Time, weight = Result, fill = Renovation)) + geom_bar(binwidth = 5) +
| |
| facet_grid(. ~ RenovationPolicy) + theme_gray(base_size = BS) + | |
| labs(
| |
| title = "Building stock in Kuopio by renovation policy",
| |
| x = "Time",
| |
| y = "Floor area (M m2)"
| |
| ) | |
| | |
| ggplot(subset(bui, RenovationPolicy == "BAU"), aes(x = Time, weight = Result, fill = Efficiency)) + geom_bar(binwidth = 5) +
| |
| facet_grid(. ~ EfficiencyPolicy) + theme_gray(base_size = BS) + | |
| labs(
| |
| title = "Building stock in Kuopio by efficiency policy",
| |
| x = "Time",
| |
| y = "Floor area (M m2)"
| |
| ) | |
| | |
| ggplot(subset(bui, RenovationPolicy == "BAU" & EfficiencyPolicy == "BAU"), aes(x = Time, weight = Result, fill = Heating)) + geom_bar(binwidth = 5) +
| |
| theme_gray(base_size = BS) + | |
| labs(
| |
| title = "Building stock in Kuopio",
| |
| x = "Time",
| |
| y = "Floor area (M m2)"
| |
| )
| |
| | |
| ggplot(subset(bui, RenovationPolicy == "BAU" & EfficiencyPolicy == "BAU"), aes(x = Time, weight = Result, fill = Building)) + geom_bar(binwidth = 5) +
| |
| theme_gray(base_size = BS) +
| |
| labs(
| |
| title = "Building stock in Kuopio",
| |
| x = "Time",
| |
| y = "Floor area (M m2)"
| |
| )
| |
| | |
| ###################### Energy and emissions
| |
| | |
| ####!------------------------------------------------
| |
| objects.latest("Op_en2791", code_name = "initiate") # [[Emission factors for burning processes]]
| |
| # emissionFactors: Burner, Fuel, Pollutant
| |
| # fuelShares: Heating, Burner, Fuel
| |
| ####i------------------------------------------------
| |
| | |
| #fuelShares <- CheckDecisions(EvalOutput(fuelShares, verbose = TRUE))
| |
| | |
| heatingEnergy <- EvalOutput(heatingEnergy, verbose = TRUE)
| |
| | |
| ################ Transport and fate
| |
| | |
| ####!------------------------------------------------
| |
| iF <- Ovariable("iF", ddata = "Op_en3435", subset = "Intake fractions of PM")
| |
| # [[Exposure to PM2.5 in Finland]] Humbert et al 2011 data
| |
| emissionLocations <- Ovariable("emissionLocations", ddata = "Op_en3435", subset = "Emission locations")
| |
| ####i------------------------------------------------
| |
| | |
| colnames(iF@data) <- gsub("[ \\.]", "_", colnames(iF@data))
| |
| iF@data$iFResult <- iF@data$iFResult * 1E-6
| |
| colnames(emissionLocations@data) <- gsub("[ \\.]", "_", colnames(emissionLocations@data))
| |
| emissionLocations@data$emissionLocationsResult <- 1
| |
| | |
| # Old data:
| |
| # objects.latest("Op_en3435", code_name = "disperse") # [[Exposure to PM2.5 in Finland]]
| |
| # iF: Iter, Emissionheight, City.area ## THESE SHOULD BE UPDATED! (precalculated with N = 1)
| |
| # emissionLocations: Heating, Emission site, Emission height
| |
| # Summarised Piltti matrix, another copy of the code on a more reasonable page
| |
| # Default run: en.opasnet.org/en-opwiki/index.php?title=Special:RTools&id=aXDIVDboftr1bTEd
| |
| | |
| emissions <- EvalOutput(emissions)
| |
| class(emissions@output$Time)
| |
| emissions@output$Time <- as.numeric(as.character(emissions@output$Time))
| |
| | |
| # Plot energy need and emissions
| |
| | |
| ggplot(heatingEnergy@output, aes(x = Time, weight = heatingEnergyResult * 1E-6, fill = Heating)) + geom_bar(binwidth = 5) +
| |
| facet_grid(EfficiencyPolicy ~ RenovationPolicy, scale = "free_y") + theme_gray(base_size = BS) +
| |
| labs(
| |
| title = "Energy used in heating in Kuopio",
| |
| x = "Time",
| |
| y = "Heating energy (GWh /a)"
| |
| )
| |
| | |
| emis <- truncateIndex(emissions, cols = "Emission_site", bins = 5)@output
| |
| | |
| ggplot(subset(emis, EfficiencyPolicy == "BAU" & FuelPolicy == "BAU"), aes(x = Time, weight = emissionsResult, fill = Emission_site)) + geom_bar(binwidth = 5) +
| |
| facet_grid(Pollutant ~ RenovationPolicy, scale = "free_y") + theme_gray(base_size = BS) +
| |
| labs(
| |
| title = "Emissions from heating in Kuopio",
| |
| x = "Time",
| |
| y = "Emissions (ton /a)"
| |
| )
| |
| | |
| ggplot(subset(emis, EfficiencyPolicy == "BAU" & RenovationPolicy == "BAU"), aes(x = Time, weight = emissionsResult, fill = Fuel)) + geom_bar(binwidth = 5) +
| |
| facet_grid(Pollutant ~ FuelPolicy, scale = "free_y") + theme_gray(base_size = BS) +
| |
| labs(
| |
| title = "Emissions from heating in Kuopio",
| |
| x = "Time",
| |
| y = "Emissions (ton /a)"
| |
| )
| |
| | |
| ggplot(subset(emis, EfficiencyPolicy == "BAU" & FuelPolicy == "BAU"), aes(x = Time, weight = emissionsResult, fill = Fuel)) + geom_bar(binwidth = 5) +
| |
| facet_grid(Pollutant ~ RenovationPolicy, scale = "free_y") + theme_gray(base_size = BS) +
| |
| labs(
| |
| title = "Emissions from heating in Kuopio",
| |
| x = "Time",
| |
| y = "Emissions (ton /a)"
| |
| )
| |
| | |
| ###################### Health assessment
| |
| | |
| ####!------------------------------------------------
| |
| objects.latest('Op_en2261', code_name = 'initiate') # [[Health impact assessment]] dose, RR, totcases.
| |
| objects.latest('Op_en5917', code_name = 'initiate') # [[Disease risk]] disincidence
| |
| objects.latest('Op_en5827', code_name = 'initiate') # [[ERFs of environmental pollutants]] ERF, threshold
| |
| #objects.latest('Op_en5453', code_name = 'initiate') # [[Burden of disease in Finland]] BoD
| |
| directs <- tidy(opbase.data("Op_en5461", subset = "Direct inputs"), direction = "wide") # [[Climate change policies and health in Kuopio]]
| |
| ####i------------------------------------------------
| |
| | |
| colnames(directs) <- gsub(" ", "_", colnames(directs))
| |
| | |
| ### Use these population and iF values in health impact assessment. Why?
| |
| | |
| frexposed <- 1 # fraction of population that is exposed
| |
| bgexposure <- 0 # Background exposure to an agent (a level below which you cannot get in practice)
| |
| BW <- 70 # Body weight (is needed for RR calculations although it is irrelevant for PM2.5)
| |
| | |
| population <- 5E+5
| |
| | |
| exposure <- EvalOutput(exposure, verbose = TRUE)
| |
| | |
| ggplot(subset(exposure@output, RenovationPolicy == "BAU" & EfficiencyPolicy == "BAU" & FuelPolicy == "BAU"), aes(x = Time, weight = exposureResult, fill = Heating)) + geom_bar(binwidth = 5) + facet_grid(Area ~ Emission_height) + theme_gray(base_size = BS) +
| |
| labs(
| |
| title = "Exposure to PM2.5 from heating in Kuopio",
| |
| x = "Time",
| |
| y = "Average PM2.5 (µg/m3)"
| |
| )
| |
| | |
| exposure@output <- exposure@output[exposure@output$Area == "Average" , ] # Kuopio is an average area,
| |
| # rather than rural or urban.
| |
| | |
| ggplot(subset(exposure@output, EfficiencyPolicy == "BAU"), aes(x = Time, weight = exposureResult, fill = Heating)) + geom_bar(binwidth = 5) + facet_grid(FuelPolicy ~ RenovationPolicy) + theme_gray(base_size = BS) +
| |
| labs(
| |
| title = "Exposure to PM2.5 from heating in Kuopio",
| |
| x = "Time",
| |
| y = "Average PM2.5 (µg/m3)"
| |
| )
| |
| | |
| totcases <- EvalOutput(totcases)
| |
| totcases@output$Time <- as.numeric(as.character(totcases@output$Time))
| |
| totcases <- oapply(totcases, cols = c("Age", "Sex"), FUN = sum)
| |
| | |
| ggplot(subset(totcases@output, EfficiencyPolicy == "BAU" & FuelPolicy == "BAU"), aes(x = Time, weight = totcasesResult, fill = Heating))+geom_bar(binwidth = 5) +
| |
| facet_grid(Trait ~ RenovationPolicy) +
| |
| theme_gray(base_size = BS) +
| |
| labs(
| |
| title = "Health effects of PM2.5 from heating in Kuopio",
| |
| x = "Time",
| |
| y = "Health effects (deaths /a)"
| |
| )
| |
| | |
| DW <- Ovariable("DW", data = data.frame(directs["Trait"], Result = directs$DW))
| |
| L <- Ovariable("L", data = data.frame(directs["Trait"], Result = directs$L))
| |
| | |
| DALYs <- totcases * DW * L
| |
| #DALYs@output <- DALYs@output[DALYs@output$Trait != "Lung cancer" , ] # Has to be removed to avoid double counting.
| |
| | |
| ggplot(subset(DALYs@output, FuelPolicy == "BAU" & Trait == "Total mortality"), aes(x = Time, weight = Result, fill = Heating))+geom_bar(binwidth = 5) +
| |
| facet_grid(EfficiencyPolicy ~ RenovationPolicy) +
| |
| theme_gray(base_size = BS) +
| |
| labs(
| |
| title = "Health effects in DALYs of PM2.5 from heating in Kuopio",
| |
| x = "Time",
| |
| y = "Health effects (DALY /a)"
| |
| )
| |
| | |
| ggplot(subset(DALYs@output, Time == 2020 & Trait == "Total mortality"), aes(x = FuelPolicy, weight = Result, fill = Heating))+geom_bar() +
| |
| facet_grid(EfficiencyPolicy ~ RenovationPolicy) +
| |
| theme_gray(base_size = BS) +
| |
| labs(
| |
| title = "Health effects in DALYs of PM2.5 from heating in Kuopio",
| |
| x = "Biofuel policy in district heating",
| |
| y = "Health effects (DALY /a)"
| |
| )
| |
| | |
| | |
| | |
|
| |
|
| </rcode> | | </rcode> |
Line 407: |
Line 222: |
| <references/> | | <references/> |
|
| |
|
| ==Related files== | | ==Related files==<!-- __OBI_TS:1424513031 --> |