Snow with raw data
Closed this issue · 13 comments
need to obtain.
So, you need the annual swe and depth anomalies that the trends were calculated on for each station? And the ecoprovince anomalies as well?
Yes for station and ecoprovince.
@ateucher @stephhazlitt
I've input the ecoprovince raw data but plotting the trend with the data is not possible without 1) an intercept and 2) a scaling factor to relate percent change in gradient to the actual anomalies
I assume you need the intercepts for depth and swe for stations and ecoprovinces?
Yes
The data records in the catalogue have been updated to include an intercept column.
The trends are on the anomalies which are
(depth / mean depth - 1) * 100
@ateucher I've treated everything as anomalies but the fit plots are out. Also surely % cm is much more understandable to the public than anomaly?
Hi Joe, I've just pushed up new raw snow data to the add-snow-data branch and will open a PR.
I tested plotting anomaly points with trend line and it looks ok to me:
library(readr)
library(ggplot2)
snow_stats <- read_csv("https://catalogue.data.gov.bc.ca/dataset/86526746-40dd-41d2-82c0-fbee3a2e93a2/resource/0e6afa41-5a2c-4e23-9d5a-e07ed35ef443/download/bcsnowdepthswetrendsbyecoprovince1950-2014.csv")
snow_anoms <- read_csv("data-raw/raw_snow_data/ecoprov_swe_depth_anomalies_1950_2014.csv")
## Coast and Mountains Snow Water Equivalent
CAM_swe <- snow_stats[snow_stats$ecoprov == "COAST AND MOUNTAINS" & snow_stats$measure == "swe", ]
ggplot(snow_anoms[snow_anoms$measure == "swe", ], aes(x = year, y = `COAST AND MOUNTAINS`)) +
geom_point() +
geom_abline(slope = CAM_swe$slope_percentperyear, intercept = CAM_swe$intercept)
## Columbia Mountains Depth
CI_depth <- snow_stats[snow_stats$ecoprov == "CENTRAL INTERIOR" & snow_stats$measure == "swe", ]
ggplot(snow_anoms[snow_anoms$measure == "depth", ], aes(x = year, y = `CENTRAL INTERIOR`)) +
geom_point() +
geom_abline(slope = CI_depth$slope_percentperyear, intercept = CI_depth$intercept)
@ateucher Thanks :)
Ah the problem is the intercept is in 00 CE not 1950. (This means the data were not centered prior to analysis)
Yes, sorry for the confusion.
Andy Teucher, MSc, RPBio
Environmental Reporting Analyst
State of Environment Reporting
Knowledge Management Branch, B.C. Ministry of Environment
Phone: (250) 387-7202tel:(250)%20387-7202 Fax: (250) 387-5757tel:(250)%20387-5757
On Nov 15, 2016, at 3:03 PM, Joe Thorley <notifications@github.commailto:notifications@github.com> wrote:
Ah the problem is the intercept is in 00 CE not 1950. (This means the data were not centered prior to analysis)
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com//issues/21#issuecomment-260798681, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACr6eyyV8EbltTDg6Hx52DsHU-vV8evIks5q-joxgaJpZM4KZVxP.
No problem - fixed