Josh-Lee1 / eBird-Fire-Index

BEES3041 Big Data Project
0 stars 0 forks source link

dealing with fire severity #15

Closed wcornwell closed 4 years ago

wcornwell commented 4 years ago

FESM atm

wcornwell commented 4 years ago

image

one way to do this. this is only the after checklists and just the distribution of fire severities where the bird was observed.

coreytcallaghan commented 4 years ago

Ah, so you are thinking a 'separate' mini-analysis, but yet still opens up the door for some discussion, etc...?

wcornwell commented 4 years ago

yup

coreytcallaghan commented 4 years ago

I'm indifferent. Seems like that would play to the 'get it out' approach well. :)

wcornwell commented 4 years ago

i think some of the "increasing species" are just playing around the edges of the fire and in low severity areas.

coreytcallaghan commented 4 years ago

Yup, was thinking that using this as an aid in interpreting the 'main' results would be good then in that instance.

Josh-Lee1 commented 4 years ago

Very cool! That all sounds good to me. Do we need to make one with before checklists to observe change?

wcornwell commented 4 years ago

Yeah I know what you mean--did the birds move? or were they just in areas that burned severely?--but I'm a bit confused how to do that analysis. Any clever ideas welcome.

coreytcallaghan commented 4 years ago

Where is the average severity in area around checklist data? I want to add it to this dataset: data_df_with_date<-read.csv("processed_data/ebird_data_with_fire_dates.csv")

wcornwell commented 4 years ago
data_df<-read_csv("processed_data/ebird_data_with_fire_dates.csv")

final_sl_dat <- data_df %>%
  #  bind_rows(lists_without) %>%
  dplyr::filter(!is.na(day_of_fire)) %>%
  mutate(DURATION.MINUTES=as.numeric(DURATION.MINUTES),
         EFFORT.DISTANCE.KM=as.numeric(EFFORT.DISTANCE.KM)) %>%
  mutate(MONTH=month(OBSERVATION.DATE)) %>%
  mutate(before.after=ifelse(OBSERVATION.DATE>day_of_fire, "After", "Before")) %>%
  filter(before.after=="After")

fesm1000<-raster("Data/Raw/fesm_geotiff/fesm1000.tif")
b<-SpatialPointsDataFrame(cbind(final_sl_dat$LONGITUDE,final_sl_dat$LATITUDE), final_sl_dat, match.ID = FALSE,
                          proj4string = CRS("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"))
bb<-spTransform(b,crs(fesm1000))
final_sl_dat$sev<-extract(fesm1000,bb)
coreytcallaghan commented 4 years ago

Don't we just want to model this somehow:

image

Note that geom_jitter was used.

wcornwell commented 4 years ago

yes somehow.

It's not a nice neat linear model problem. fire severity for the before observations (ie severity of the future fire) is quite confusing.

wcornwell commented 4 years ago

could be a before/after * severity interaction, maybe?

wcornwell commented 4 years ago

possible figure:

image

any thoughts?

coreytcallaghan commented 4 years ago

I think this is solid. It will definitely help with writing the discussion a bit. And is probably the focal point for a whole paragraph. We can make an interactive version and host it on github and link to it, too. So people can see what species are which....

Josh-Lee1 commented 4 years ago

Very cool! Is the trendline for all species? And will we have something like this for all traits?

On Thu., 10 Sep. 2020, 10:24 Corey Callaghan, notifications@github.com wrote:

I think this is solid. It will definitely help with writing the discussion a bit. And is probably the focal point for a whole paragraph. We can make an interactive version and host it on github and link to it, too. So people can see what species are which....

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Josh-Lee1/eBird-Fire-Index/issues/15#issuecomment-689894630, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOENO3TOSFL54BWMAPBAGA3SFAMEXANCNFSM4QP7FDRA .

coreytcallaghan commented 4 years ago

I don't think it is necessary for all traits, but tailor it to what we want to write our discussion around, in my opinion.

@wcornwell can you just paste the df underlying this plot into an RDS somewhere and let me know where. I'll try making an interactive figure and putting it in this repository.

wcornwell commented 4 years ago
library(readr)
library(plotly)
oo<-read_csv("processed_data/severity_data_and_traits.csv")
z<-ggplot(oo,aes(x=median.sev,y=-1*Estimate,label=COMMON.NAME,))+
  geom_point(aes(col=feeding_specialisation))+geom_smooth(method="lm")+ylab("modeled response to fire")+
  geom_hline(yintercept = 0,linetype="dashed")+xlab("Median fire severity in post-fire observations")+
  theme_classic()

ggplotly(z)
coreytcallaghan commented 4 years ago

Hey @Josh-Lee1 can you go into your settings and flick github pages on?

Should look something like this:

image

Josh-Lee1 commented 4 years ago

Ok done. Let me know if I clicked the wrong button.

coreytcallaghan commented 4 years ago

Sweet - this link should be live now and sharable with anyone: https://josh-lee1.github.io/eBird-Fire-Index/interactive_figure.html

Josh-Lee1 commented 4 years ago

Cool! Thanks Corey.

On Thu., 10 Sep. 2020, 11:02 Corey Callaghan, notifications@github.com wrote:

Sweet - this link should be live now and sharable with anyone: https://josh-lee1.github.io/eBird-Fire-Index/interactive_figure.html

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Josh-Lee1/eBird-Fire-Index/issues/15#issuecomment-689906619, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOENO3Q4ZPYZKCG6WBVVZT3SFAQQ3ANCNFSM4QP7FDRA .

coreytcallaghan commented 4 years ago

We can pretty it up once we have an idea of what the final figure will look like.

Josh-Lee1 commented 4 years ago

Hey @wcornwell Just want to clarify that you have called anything with 2 or more feeding guilds a generalist and specialists only have 1? Thanks