RMI-PACTA / scenarioSelector

A shiny app to find a scenario
https://twodii.shinyapps.io/scenarioSelector/
Other
1 stars 1 forks source link

Add survey questions #2

Closed jdhoffa closed 3 years ago

jdhoffa commented 3 years ago

I have read through the currently existing survey questions, and transcribed the "Question" and possible "Answers" for each step of the survey.

There are some questions that should only appear if the answer to a previous question is a certain value. These I have denoted with Question 1, Question 1.1, Question 1.1.1 and so on.

There are two questions for which the possible answers actually come from datasets, I will open up a separate issue explaining how these datasets can be generated.

@maurolepore once you have the general app skeleton in place, feel free to start working on getting these actual questionnaire questions included in a PR.

# Survey Questions
# Question 0: Use default scenarios and skip survey
q0_answers <- c(TRUE, FALSE)

# Questions 1 - 3 Don't Seem to Filter Anything ---------------------------
# My guess is that these were designed with the idea of "keeping track" of 
# people using the application. For an MVP we do not need this functionality. 

# Question 1: What type of organization do you represent? 
q1_answers <- c(
  "Non-Financial Corporate",
  "Financial Institutions",
  "Civil Society (Cooperatives, Research Institutions)",
  "Government – Supervisor/Central Bank, Policy Makers"
)

# Question 1.1: (If previous answer was "Financial institutions) 
# What type of financial institution?

q1_fin_answers <- c(
  "Lenders (Private Sector Banks)",
  "Asset Owner (Pension Funds, Endowments, Sovereign Wealth Funds, Foundations 
  and Insurance Companies)",
  "Asset Manager"
)

# Question 2: What purpose are you using the scenario for?

q2_answers <- c(
  "Exposure & alignment analysis to inform engagement",
  "Exposure & alignment analysis to inform divestment",
  "Financial analysis/ risk assessment",
  "Disclosure"
)

# This is where we actuallly begin to filter data -------------------------
# Question 3: Do you have a specific level of ambition? 

q3_answers <- c(
  "A specific temperature outcome and probability by 2100",
  "% GHG (or CO2) emission reductions by set point in time (e.g. annual 5% CO2 
  emission reduction from the energy sector by 2030)",
  "Alignment with the Paris agreement by a point in time (SBT FI approved 
  scenarios)",
  "Currently no specific ambition"
)

# Question 3.1: (If previous answer was "A specific temperature outcome and 
# probability by 2100")
# What temperature outcome? 

q3_temp_answers <- c(
  "1.5°C path",
  "2.0°C path",
  "Probability of temperature rising by RCP (Representative Concentration 
  Pathway) forcing level"
)

# Question 3.1.1 (If previous answer was "Probability of temperature...")
# Specify longterm policy on RCP forcing level:

q3_temp_rcp_answers <- c(
  "None",
  "Low",
  "Medium",
  "Upper Medium",
  "High",
  "Very High"
  )

# Question 3.1.1.1 (If previous answer was "None")
# Specify narrative for shared socioeconomic pathways

q3_temp_rcp_none_answers <- c(
  "Taking the Green Road (Low challenges to mitigation and adaptation)",
  "Middle of the Road (Medium challenges to mitigation and adaptation)",
  "Regional Rivalry: A Rocky Road (High challenges to mitigation and adaptation)",
  "Inequality: A Road Divided (Low challenges to mitigation, high challenges to adaptation)",
  "Fossil fueled Development: Taking the Highway (High challenges to mitigation, low challenges to adaptation)"
)

# Question 3.1.1.2 (If previous answer was "Low")
# Specify narrative for shared socioeconomic pathways

q3_temp_rcp_low_answers <- c(
  "Taking the Green Road (Low challenges to mitigation and adaptation)",
  "Middle of the Road (Medium challenges to mitigation and adaptation)",
  "Inequality: A Road Divided (Low challenges to mitigation, high challenges to adaptation)",
  "Fossil fueled Development: Taking the Highway (High challenges to mitigation, low challenges to adaptation)"
)

# Question 3.1.1.3 (If previous answer was "Medium")
# Specify narrative for shared socioeconomic pathways

q3_temp_rcp_med_answers <- c(
  "Taking the Green Road (Low challenges to mitigation and adaptation)",
  "Middle of the Road (Medium challenges to mitigation and adaptation)",
  "Inequality: A Road Divided (Low challenges to mitigation, high challenges to adaptation)",
  "Fossil fueled Development: Taking the Highway (High challenges to mitigation, low challenges to adaptation)"
)

# Question 3.1.1.4 (If previous answer was "Upper Medium")
# Specify narrative for shared socioeconomic pathways

q3_temp_rcp_umed_answers <- c(
  "Taking the Green Road (Low challenges to mitigation and adaptation)",
  "Middle of the Road (Medium challenges to mitigation and adaptation)",
  "Regional Rivalry: A Rocky Road (High challenges to mitigation and adaptation)",
  "Inequality: A Road Divided (Low challenges to mitigation, high challenges to adaptation)",
  "Fossil fueled Development: Taking the Highway (High challenges to mitigation, low challenges to adaptation)"
)

# Question 3.1.1.5 (If previous answer was "High")
# Specify narrative for shared socioeconomic pathways

q3_temp_rcp_high_answers <- c(
  "Taking the Green Road (Low challenges to mitigation and adaptation)",
  "Middle of the Road (Medium challenges to mitigation and adaptation)",
  "Regional Rivalry: A Rocky Road (High challenges to mitigation and adaptation)",
  "Inequality: A Road Divided (Low challenges to mitigation, high challenges to adaptation)",
  "Fossil fueled Development: Taking the Highway (High challenges to mitigation, low challenges to adaptation)"
)

# Question 3.1.1.6 (If previous answer was "Very High")
# Specify narrative for shared socioeconomic pathways

q3_temp_rcp_vhigh_answers <- c(
  "Middle of the Road (Medium challenges to mitigation and adaptation)",
  "Regional Rivalry: A Rocky Road (High challenges to mitigation and adaptation)",
  "Inequality: A Road Divided (Low challenges to mitigation, high challenges to adaptation)",
  "Fossil fueled Development: Taking the Highway (High challenges to mitigation, low challenges to adaptation)"
)

# Question 4: Are you driven by opportunity and risks that a regionally specific?

q4_answers <- c("Region Specific", "Country Specific")

# Question 4.1 (If previous answer was "Region Specific")
# Pick region: 

q4_region_answers <- regions
#> Error in eval(expr, envir, enclos): object 'regions' not found

# Question 4.2 (If previous answer was "Country Specific")
# Pick country: 

q4_country_answers <- countries 
#> Error in eval(expr, envir, enclos): object 'countries' not found

# Note: If user picks a country, and there is no country level scenario, can 
# look-up which region(s) contains the selected country(s)

# Question 5: Which sectors are you primarily concerned with?

q5_answers <- c(
  "Energy (Primary Energy Supply, Coal, Oil & Gas)",
  "Power",
  "Industry",
  "Transport",
  "Real Estate",
  "Agriculture",
  "No Preference"
)

# Question 6: Which issues below do you want explicitly included in the scenario?

q6_answers <- c(
  "A specific SSP",
  "GDP/Population growth (as growth rate categories)",
  "The acceptance of nuclear energy",
  "The role of carbon capture and storage",
  "Carbon dioxide removal / negative emissions technologies",
  "The level of deployment of renewable energy technologies (as growth rate categories)",
  "Carbon price evolution (price bands in a particular time frame)",
  "Energy efficiency improvements (linked to real estate most likely)",
  "Growth of energy demand",
  "Level of supply side investment",
  "The role of energy crops (as growth rate categories)",
  "Rate of removal of fossil fuel subsidies (as rate categories)"
)

# Question 6.1: (If previous answer was "SSP")
# Specify SSP category:
q6_ssp_answers <- c(
  "SSP1",
  "SSP2",
  "SSP3",
  "SSP4",
  "SSP5"
)

# Question 6.2: (If previous answer was "GDP")
# Specify GDP Growth Rate:
q6_gdp_answers <- c(
  "Low growth (<= 30%)",
  "Medium growth (between 30-150%)",
  "High growth (>= 150%)"
)

# Question 6.3: (If previous answer was "Nuclear Energy Acceptance")
# Specify the Nuclear Growth or Reduction Rate: 
q6_nea_answers <- c(
  "Reduction (< -10%)",
  "Stable (between -10 to 10%)",
  "Low growth (between 10-50%)",
  "Medium growth (between 50-100%)",
  "High growth (>100%)"
)

# Question 6.4: (If previous answer was "CCS")
# Specify the CCS Growth Rate:
q6_ccs_answers <- choiceNames = c(
  "Low growth (<= 2000)",
  "Medium growth (between 2000-8000)",
  "High growth (>= 8000)"
)
#> Error in q6_ccs_answers <- choiceNames = c("Low growth (<= 2000)", "Medium growth (between 2000-8000)", : object 'q6_ccs_answers' not found

# Question 6.5: (If previous answer was "CDR Negative Emissions")
# Specify the CDR Growth Rate: (In Mega Tonnes? Not sure about this)
q6_cdr_answers <- c(
  "Low growth (<= 350)",
  "Medium growth (between 350-2500)",
  "High growth (>= 2500)"
)
# Question 6.6: (If previous answer was "Renewable Energy Deployment")
# Specify the Renewable Deployment Growth Rate:
q6_red_answers <- c(
  "Low growth (<= 30%)",
  "Medium growth (between 30-150%)",
  "High growth (>= 150%)"
)

# Question 6.7: (If previous answer was "Carbon Price Evolution")
# Specify the Carbon Price Evolution Growth Rate
q6_cpe_answers <- c(
  "Low price (<= 50)",
  "Medium price (between 50-250)",
  "High price (>= 250)"
)

# Question 6.8: (If previous answer was "Energy Efficiency Improvements")
# Specify the Energy Efficiency Growth Rate:
q6_eei_answers <- c(
  "Low growth (<= 60%)",
  "Medium growth (between 60-200%)",
  "High growth (>= 200%)"
)

# Question 6.9: (If previous answer was "Growth Energy Demand")
# Specify the Energy Demand Growth Rate:
q6_ged_answers <- c(
  "Reduction (< -5%)",
  "Stable (between -5 to 5%)",
  "Low growth (between 5-15%)",
  "Medium growth (between 15-50%)",
  "High growth (> 50%)"
)

# Question 6.10: (If previous answer was "Supply Side Invesment")
# Specify the Supply Side Investment Growth Rate:
q6_ssi_answers <- c(
  "Low growth (<= 20%)",
  "Medium growth (between 20-125%)",
  "High growth (>= 125%)"
)

# Question 6.11: (If previous answer was "Growth Energy Crops")
# Specify the Energy Crop Growth Rate:
q6_gec_answers <- c(
  "Low growth (<= 20%)",
  "Medium growth (between 20-100%)",
  "High growth (>= 100%)"
)

# Question 6.12: (If previous answer was "Fossil Fuel Removal Rate")
# Specify the Fossil Fuel Subsidy Growth Rate:
q6_ffrr_answers <- c(
  "Low growth (<=20%)",
  "Medium growth (between 20-50%)",
  "High growth (>=50%)"
)

# Question 7: 
# What Time Horizon Are You Primarily Concerned With?
q7_answers <- c(
  "Short Term Risk (<5 Years)",
  "Medium-Term Risk (5-15 Years)",
  "Long-Term Risk (>15 Years)"
)

Created on 2021-07-15 by the reprex package (v2.0.0)

maurolepore commented 3 years ago

Thanks @jdhoffa,

If I understand correctly you suggest I should add ui components for all these questions before we connect them to the corresponding outputs in the server.

Instead of adding all these questions and have them unconnected to outputs I would rather start by implementing only a couple and have them connected to real outputs. I think that will give me quickly a good idea of the entire process the app needs to do. Once I know that, adding new questions should be a little easier.

For example, the toy app has two types of questions -- one that picks values from a column that already exists in the (fake) source dataset "scenario_data.rds", and another one that picks values from a column (nuclear) that I created specifically to answer a question ("has nuclear?"). Those two questions illustrate two different strategies to pick data.

jdhoffa commented 3 years ago

Yup, I agree with that approach! I just wanted to get all of the questions in one place on github so that we can use it as a reference

maurolepore commented 3 years ago

Superseded by #5