OHI-Science / kor

OHI+ assessment for the Republic of Korea (South Korea)
1 stars 1 forks source link

Questions about livelihoods calculation #4

Open MijuKim opened 7 years ago

MijuKim commented 7 years ago

I would be very grateful if you could help me on this. This is not a big problem, but I would like to know.

As for the OHI global assessment 2013, it (Halpern et al., 2015, Patterns and Emerging Trends in Global Ocean Health) says,

Adjustments included in the 2013 assessment were simplified from those used in the 2012 calculations. (... omitted...) Jobs data, which were not updated, were adjusted by dividing by percent employment for the corresponding year: (1 – percent unemployment) * total labor force (data from the World Bank).

In functions.R, it calculates with "proportion_employed" (multiplication) but I think it should do with "employed" (division) to satisfy what it explains in Halpern et al., 2015.

` # calculate employment counts le_employed = le_workforce_size %>% left_join(le_unemployment, by = c('region_id', 'year')) %>% mutate(proportion_employed = (100 - pct_unemployed) / 100, employed = jobs_all * proportion_employed)

liv =

adjust jobs

le_jobs %>%
left_join(multipliers_jobs, by = 'sector') %>%
mutate(jobs_mult = jobs * multiplier) %>%  # adjust jobs by multipliers
left_join(le_employed, by= c('region_id', 'year')) %>%
mutate(jobs_adj = jobs_mult * proportion_employed) %>% # adjust jobs by proportion employed
left_join(le_wages, by=c('region_id','year','sector')) %>%
arrange(year, sector, region_id)

` Changing like this? mutate(jobs_adj = jobs_mult / employed)

Division by "employed" makes the number of "jobs_adj" very small and changes the scores a little. It might not be an important question after all. So if you think this is not important, you don't need to answer. Thanks!

jules32 commented 7 years ago

Hi @MijuKim,

Thanks for your question. The LIV and ECO models that are in your KOR repo are a simplified version of what is described in Halpern et al. 2015, so it might not match up perfectly. This is because the data available for this goal in the global assessments (Halpern et al. 2015) have not been updated in a few years and you could create a simpler model with better data that you have in Korea.

I've been looking at your KOR repo and see that you've been adding layers and working in functions.r, which is great! I did notice one thing that I wanted to bring to your attention: your data layers all have rgn_id as 0, like this:

>   le_gdp <- layers$data$le_gdp_krw

> le_gdp
    rgn_id   year  gdp_krw
1          0 2000 6.35e+14
2          0 2001 6.88e+14
3          0 2002 7.62e+14
4          0 2003 8.11e+14
5          0 2004 8.76e+14
6          0 2005 9.20e+14
7          0 2006 9.66e+14
8          0 2007 1.04e+15
9          0 2008 1.10e+15
10         0 2009 1.15e+15
11         0 2010 1.27e+15
12         0 2011 1.33e+15
13         0 2012 1.38e+15
14         0 2013 1.43e+15
15         0 2014 1.49e+15
16         0 2015 1.56e+15
17         0 2016 1.64e+15

But you'll actually need to have data for each of the regions that you want to assess, which are the 11 regions you provided in the shapefile. Then, the models will take data from each rgn_id and calculate scores for each region. And at the very end, it will combine them all to calculate a final score for South Korea (rgn_id 0).

Let me know if you want to talk about this and we can set up a call!

MijuKim commented 7 years ago

Hi @jules32 This is an update after our talk.

As for the rgn_id 0 of LE, I've changed all the data from rgn_id 0 to 13 (but I quite doubt that this was really necessary). Because I also amended functions.r to delete rgn_id 13 after calculating status and trend. It is redistributed to rgn 1 to 11.

As for the other 6 goals, I deleted them from functions.r because I could not handle "error message" from CS and CP goals.

Thanks! Miju

jules32 commented 7 years ago

Hi @MijuKim,

Yes, I wanted to follow up after a conversation I had with my team. You can calculate the status and trend for rgn_id 0, and then distribute the values to rgn 1 to 11. I think that's what you have done. I'll have a look at your KOR repo and see if I help you make sure that's working correctly and get you past the error messages.

jules32 commented 7 years ago

Hi @MijuKim,

Yes, the way you have dealt with the rgn 1 to 11 makes sense. You are correct though; you could have done this with rgn_id 0 instead of 13.

I wrote up a little description about this on the forum since it was a great question and solution.

Cheers, Julie

MijuKim commented 7 years ago

Hi @jules32,

Thanks for explanation and an issue on the forum! The codes you wrote on the forum look much simpler and tidier than mine.

Thanks, Miju