-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make a function for static map output of station results for selected year #8
Comments
Need to add basemap to this... library(ggrepel)
library(sf)
library(ggmap)
data(tbseg)
prj <- '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs'
yrsel <- 2019
tomap <- epcdata %>%
anlz_avedatsite() %>%
anlz_attainsite(yrrng = yrsel, thr = 'chla') %>%
dplyr::left_join(stations, by = c('epchc_station', 'bay_segment')) %>%
mutate(
trgtmet = factor(trgtmet, levels = c('yes', 'no'), labels = c('yes', 'no'))
) %>%
st_as_sf(coords = c('Longitude', 'Latitude'), crs = prj)
leglab <- paste0('Target met\nin ', yrsel, '?')
seglabs <- data.frame(
Longitude = c(-82.6, -82.64, -82.59, -82.4),
Latitude = c(27.55, 27.8, 28, 27.91),
bay_segment = c('LTB', 'MTB', 'OTB', 'HB')
) %>%
st_as_sf(coords = c('Longitude', 'Latitude'), crs = prj)
ggplot() +
geom_sf(data = tbseg, fill = NA) +
geom_sf(data = tomap, aes(colour = trgtmet, fill = trgtmet)) +
geom_text_repel(data = tomap, aes(label = round(val, 1), geometry = geometry), stat = "sf_coordinates", size = 3) +
geom_text(data = seglabs, aes(label = bay_segment, geometry = geometry), stat = "sf_coordinates") +
scale_fill_manual(leglab, values = c('red', 'green'), drop = F) +
scale_colour_manual(leglab, values = c('red', 'green'), drop = F) +
theme(
axis.title = element_blank()
)
|
dc46cc8 Good enough show_mapsite(epcdata, 2018) |
Hi Marcus, this gmail account is what I use when I am signed in to GitHub.
Is it causing you problems when you are doing tbep tech edits?
Mike McManus
…On Tue, Nov 26, 2019 at 4:20 PM Marcus W Beck ***@***.***> wrote:
like so:
[image: image]
<https://user-images.githubusercontent.com/3086881/69673601-ac34b500-1068-11ea-8f53-0e7fedc7b157.png>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#8?email_source=notifications&email_token=AB6IO3INT4WUAMEJA4Z46JLQVWHLBA5CNFSM4JR57D42YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H4HSE3Q>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB6IO3LCS2UNH4AHRW6AN6DQVWHLBANCNFSM4JR57D4Q>
.
|
Hi Mike,
No, not a problem at all. You receive automatic email updates whenever I
create issues or pull requests to this repository. If you want to turn
those off, you can just go to the repository and click the unwatch button
at the top.
[image: image.png]
…-Marcus
On Sat, Nov 30, 2019 at 12:11 PM mgm-cincy ***@***.***> wrote:
Hi Marcus, this gmail account is what I use when I am signed in to GitHub.
Is it causing you problems when you are doing tbep tech edits?
Mike McManus
On Tue, Nov 26, 2019 at 4:20 PM Marcus W Beck ***@***.***>
wrote:
> like so:
>
> [image: image]
> <
https://user-images.githubusercontent.com/3086881/69673601-ac34b500-1068-11ea-8f53-0e7fedc7b157.png
>
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <
#8?email_source=notifications&email_token=AB6IO3INT4WUAMEJA4Z46JLQVWHLBA5CNFSM4JR57D42YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H4HSE3Q
>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AB6IO3LCS2UNH4AHRW6AN6DQVWHLBANCNFSM4JR57D4Q
>
> .
>
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#8?email_source=notifications&email_token=AAXRUII2MLF4CIUGOPUBT53QWKNE7A5CNFSM4JR57D42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFQOEEI#issuecomment-559997457>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXRUINY7TSC4EN5KQSZ5Q3QWKNE7ANCNFSM4JR57D4Q>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
like so:
The text was updated successfully, but these errors were encountered: