Skip to content
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

Lightning Demos: Data visualization - December 3 #292

Closed
aays opened this issue Oct 18, 2020 · 2 comments
Closed

Lightning Demos: Data visualization - December 3 #292

aays opened this issue Oct 18, 2020 · 2 comments

Comments

@aays
Copy link
Member

aays commented Oct 18, 2020

Come share some cool plots you've made and how you made them! All languages and fields of research welcome.

There are no rules to Lightning Demos except that demos should be no more than 5-10 minutes in length and focusing primarily on the code itself. Anyone is welcome to present!

Where: Zoom https://utoronto.zoom.us/j/86100715008 (Password: coders)
When: Thursday, December 3, from 19:00 - 20:00
Instructor: n/a
Skill level: n/a

Installation Instructions: n/a

Note: Our sessions will all be held online until further notice, instead of at the MADLab.

@margot-l
Copy link

margot-l commented Dec 4, 2020

Network of genes/metabolites in R: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2682514/
The The R significance brackets (using the manual entry): https://github.com/const-ae/ggsignif

From Me to Everyone: (8:06 PM)
A great tutorial on both numpy and pandas (Python) and how to use them together: https://www.hackerearth.com/practice/machine-learning/data-manipulation-visualisation-r-python/tutorial-data-manipulation-numpy-pandas-python/tutorial/

@aays
Copy link
Member Author

aays commented Dec 6, 2020

Other things that were covered:

  • assembling plots with patchwork (again!)
  • making plots of maps with Tableau
  • making pretty heatmaps in R with pheatmap
  • using the projects package to streamline making plots and overall project management
  • using functions with ggplot themes + using lists to save ggplot theme formatting:
# use function to make a modifiable theme object
fig_1_theme <- function(font_size = 12) {
  theme(
    axis.title = element_text(family = 'Helvetica', size = font_size,
    axis.text = element_text(family = 'Helvetica', size = font_size))
  }
}

# save ggplot plot modifications to list
plot_mods <- list(
  xlab('Length'),
  ylab('Width'),
  coord_cartesian(x = c(0, 10), y = c(0, 10))
)

sepal_plot <- ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width) +
  geom_point() +
  fig_1_theme(font_size = 12) +
  plot_mods

petal_plot <- ggplot(iris, aes(x = Petal.Length, y = Petal.Width) +
  geom_point() +
  fig_1_theme(font_size = 12) +
  plot_mods

# join plots with patchwork
final_plot <- sepal_plot + petal_plot + plot_layout(ncol = 1, nrow = 2)

Thanks all for a great session and a wonderful semester! We hope to have a schedule out for next semester's events soon. We also aim to send out a survey to help gauge interest in different event topics for the coming semester - stay tuned!

@aays aays closed this as completed Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants