-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
abstracting to facets #10
Comments
they aren't technically geom's … but … since I added in a geom for the rounded corners, it got me thinking that adding a a "statebins" I'll keep you posted as it's def a gd idea. |
So, something like…
? |
Bravo! I think it's a very meaningful improvement.
…On Mon, Nov 20, 2017, 7:40 AM boB Rudis ***@***.***> wrote:
So, something like…
library(statebins)
library(cdcfluview)
library(hrbrthemes)
library(tidyverse)
flu <- ili_weekly_activity_indicators(2017)
ggplot(flu, aes(state=statename, fill=activity_level)) +
geom_statebins() +
coord_equal() +
viridis::scale_fill_viridis(
name = "ILI Activity Level ", limits=c(0,10), breaks=0:10, option = "magma", direction = -1
) +
facet_wrap(~weekend) +
labs(title="2017-18 Flu Season ILI Activity Level") +
theme_statebins(base_family = font_ps) +
theme(plot.title=element_text(size=16, hjust=0)) +
theme(plot.margin = margin(30,30,30,30))
[image: image]
<https://user-images.githubusercontent.com/509878/33018870-19ddcda4-cdc6-11e7-946c-5b2e08b1024a.png>
?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABWyx40z1Bi00MhOW2ZhkPwBSPNiDPSBks5s4XNMgaJpZM4Qjn60>
.
|
Thx. I literally (as I hit ENTER) just pushed this up so if you get a chance to kick the tyres any and all feedback wld be greatly appreciated. Was a quick but pretty thorough hack this AM :-) |
Will do!
…On Mon, Nov 20, 2017, 7:58 AM boB Rudis ***@***.***> wrote:
Thx. I literally (as I hit ENTER) *just* pushed this up so if you get a
chance to kick the tyres any and all feedback wld be greatly appreciated.
Was a quick but pretty thorough hack this AM :-)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABWyx8d86V1SRtAn3Ov6W1x80me7g0GUks5s4XdqgaJpZM4Qjn60>
.
|
When I attempt to replicate the flu facets above, with
I get
|
hrm. let me work up an example that doesn't depend on cdcfluview |
give
a go |
same error message:
and just because I'm a klutz, the data prep part on
|
Sounds like the pkg had a busted install. may want to try reinstalling
again. I'll try an install on a cpl other machines a bit later today.
…On Mon, Nov 20, 2017 at 11:45 AM, thomasjwood ***@***.***> wrote:
same error message:
Error in gzfile(file, mode) : cannot open the connection
In addition: Warning message:
In gzfile(file, mode) :
cannot open compressed file '/tmp/setupdata.rds', probable reason 'No such file or directory'
and just because I'm a klutz, the data prep part on USArrests works ok:
rownames_to_column(USArrests, "state") %>%
tbl_df() %>%
gather(crime, value, -state) %>%
# A tibble: 2 x 3
state crime value
<chr> <chr> <dbl>
1 Alabama Murder 13.2
2 Alaska Murder 10.0
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAfHtu7pVsuH81fcLYdEm9DnSim_t3Ztks5s4ay5gaJpZM4Qjn60>
.
|
I'm also getting the same error ('/tmp/setupdata.rds': no such file or directory). The first time may have been because of a bad install. After reinstalling, I didn't get any warnings or error messages and the install ended with SUCCESS, but I'm still getting the same error. |
same, a reinstall still results
|
In both the cdcfluview and USArrests examples, the error (cannot open compressed file '/tmp/setupdata.rds') is triggered at the "+ geom_statebins()" step. |
I've been looking at the line saveRDS(xdat, "/tmp/setupdata.rds") in geom-statebins.R. I noticed that my local statebins package folder doesn't have a folder named "tmp". Creating it manually doesn't get rid of the error. So I'm wondering if one of the issues has to do with the first forward slash in the target directory. Example: |
I forked the statebins repo, made the substitution described above [to saveRDS(x, "tmp/setupdata.rds") ], installed the edited version of the package, and now both code examples (flu and USArrests) discussed above work for me. I'll submit a Pull Request with the change in a minute. |
I hesitate to ask this, given how quickly you responded (over the weekend!) to my request via twitter, but here goes--is it much work to allow statebins to accept a
facet_wrap
orfacet_grid
argument?The text was updated successfully, but these errors were encountered: