class: title-slide, right, bottom background-image: url(img/horst-starwars-rey.png) background-size: contain background-position: bottom left ## R & friends for better science in less time<br>in big (& small) team collaborations ### Julia Stewart Lowndes, PhD ### National Center for Ecological Analysis & Synthesis, UCSB [
@juliesquid](https://twitter.com/juliesquid) [
lowndes@nceas.ucsb.edu](mailto:lowndes@nceas.ucsb.edu) [
openscapes.org/media](http://openscapes.org/media) <img src="img/mozilla.png" alt="mozilla" style="float:right;width:154px;"/> <img src="img/nceas.png" alt="nceas" style="float:right;width:150px;"/> ??? --- <img src="img/horst-lowndes-loop-wtext.png" width="100%" /> .footnote[ art: [@allison_horst](https://twitter.com/allison_horst) ] ??? The way I have been thinking about it, open data science tools and practices and teamwork & collaboration exist in this feedback loop. Learning and using similar software promotes and streamlines teammwork. And also working as a team better equips you to learn open practices data science. But as env scientists, we're never taught data science/open practices, and we're not taught to work as a team, even when we are physically sitting with other scientists similar to us in our research groups research group --- <img src="img/horst_openscapes_grassland_1500px-text-hex.png" width="100%" style="display: block; margin: auto;" /> .pull-left[ **A mentorship program for research teams to help build mindsets and habits around open data science, and grow the community of practice.** <br> **Operated by NCEAS and incubated by Mozilla** .footnote[ web: [openscapes.org](https://openscapes); twitter: [@openscapes](https://twitter.com/openscapes) ] ] .pull-right[ <img src="img/Cohort1_zoom.png" width="85%" style="display: block; margin: auto;" /> ] ??? this builds from nearly 7 years of the OHI --- <img src="img/ohi-illustration-hex.png" width="80%" style="display: block; margin: auto;" /> .pull-left[ **A scientific method, tool, and community for channeling the best available scientific information into marine policy.** <br> **Global assessments annually since 2012** <br> **Independent assessments in ~20 geographies** <!---(example: Ecuador, Baltic, Northeast US) ---> .footnote[ source: [*Halpern et al. 2012*: An Index to assess the health and benefits of the global ocean](http://www.nature.com/nature/journal/v488/n7413/full/nature11397.html); web: [ohi-science.org](http://ohi-science.org) ] ] .pull-right[ <img src="img/ohi-team-2018b-crop.jpeg" width="100%" style="display: block; margin: auto;" /> ] ??? A scientific method, tool, and community for channeling the best available scientific information into marine policy. It is being used by the United Nations and by 20 groups around the world. transition: But I like to talk about this with analogies from Star Wars --- class: center, middle background-image: url(img/horst-starwars-luke.png) background-size: contain .footnote[ art: [@allison_horst](https://twitter.com/allison_horst) ] ??? This is Luke Skywalker after he crashed his plane on Dagobah. He is there staring at a problem that he can’t solve with the skillsets he has, and it is demoralizing. This plane can represent a lot of things for data analysis. As an individual, it can be data that is too big to be opened in Excel. It can be your self-taught code that you are too ashamed of embarrassed to share And as a team, it can be not being able to run code sent by a colleague. It can be the time spent organizing the files your students send you through a mosaic of Google Drive and GitHub links, email attachments, and thumb drives. For environmental scientists, there are ways big and small that can leave you feeling like Luke here. If you imagine what it would be like for Luke if he had used whatever ropes or pulleys he had on hand, it probably wouldn’t have been pretty, reproducible, or gotten him where he needs to be on time. transition: but luckily what happens next is that he meets Yoda --- class: top, center <img src="img/horst-starwars-yoda.png" width="88%" /> .footnote[ art: [@allison_horst](https://twitter.com/allison_horst) ] ??? But Yoda comes along and can solve Luke's problem in a way Luke never imagined. He uses the Force. And the Force is a powerful skillset and mindset because Luke can see this and learn from Yoda, and he can go on then to not only solve his current but it will broaden his mind to what is possible in the future. Open data science is the Force that helps us do better science in less time. It can be: As an individual: code in an open source language like R, having your own work be more automated and reproducible And as a team: coding and coordinating collaboratively with tools like GitHub being empowered by open practices and having it be part of the whole research process These types of practices not only save time and are more reproducible, but it’s a whole mindset of what is possible as you reduce friction in the day-to-day analyses and become comfortable with the power of these tools. So the Force is a powerful thing, but importantly, it is not something that exists on its own. Transition: But Luke didn't go on to defeat the Empire himself, he had a whole community. --- class: center, middle background-image: url(img/horst-starwars-hands.png) background-size: contain .footnote[ art: [@allison_horst](https://twitter.com/allison_horst) ] ??? And this community is powerful because of the diversity of backgrounds and expertise, and although not everyone is a Jedi, everyone contributes in really critical ways. So in science this can be Teaching scientists how to code through university courses and trainings like the Carpentries Championing open science by mentioning it in science talks, publications faculty meetings, Funding opportunities for scientists to participate in open science Building software to meet scientists where they are transition: So to recap: --- class: title-slide, right, bottom background-image: url(img/horst-starwars-rey.png) background-size: contain background-position: bottom left ??? R is the Force that enables us as scientists to do better science in less time. It empowers us to get our own data out of the swamp. It empowers us and build off of our confidence and experiences and broaden the scope of scientific challenges that we can tackle, which for environmental scientists, includes food security, disease transmission, and climate change. --- <img src="img/horst-lowndes-loop-wtext.png" width="100%" /> ??? This is my outline. Will talk this through --- <img src="img/OHI-hex.png" width="55%" style="display: block; margin: auto;" /> .footnote[ source: [Halpern et al. 2012](http://www.nature.com/nature/journal/v488/n7413/full/nature11397.html); web: [ohi-science.org](http://ohi-science.org); [@OHIscience](https://twitter.com/OHIscience) ] The Ocean Health Index is a scientific endeavor to quantify impacts and benefits of oceans around the world using the best publically available data. It is being used by the United Nations and by 20 groups around the world. There is a lot to it but what is relevant here is that we combine lots of data, we repeat our analyses every year, and we do it as a team. But we are marine scientists, and we were never trained to work responsibly with data. So we found out the hard way that our default approaches were not reproducible by even ourselves. Getting through this involved quite a reckoning, but when we got through it, we knew we had a story to tell. --- .pull-left[ <img src="img/horst-starwars-luke.png" width="60%" style="display: block; margin: auto;" /> <img src="img/teucher1.png" width="100%" style="display: block; margin: auto;" /> .footnote[ art: [@allison_horst](https://twitter.com/allison_horst), graphics: [Andy Teucher](https://github.com/ateucher/vic-geogeeks-2018-01-30) ] ] -- .pull-right[ <img src="img/horst-starwars-yoda.png" width="60%" style="display: block; margin: auto;" /> <br> <img src="img/teucher2.png" width="95%" style="display: block; margin: auto;" /> ] ??? Because we were all self taught, we came at OHI with the mismatches. Difficult workflows, and difficult to collaborate. --- class: middle, center <img src="img/nature-screenshot-title.png" width="100%" style="display: block; margin: auto;" /> .footnote[ source: [Lowndes *et al.* 2017](https://www.nature.com/articles/s41559-017-0160); web: [ohi-science.org/betterscienceinlesstime](http://ohi-science.org/betterscienceinlesstime/) ] ??? Figuring out was a big enough deal that we published this in Nature Ecology & Evolution. What made it unique: we shared our struggles, and described the transition --- ### More reproducibility & collaboration, less time <img src="img/bsilt-fig1-simple.png" width="60%" style="display: block; margin: auto;" /> .footnote[ source: [*Lowndes et al. 2017* Our path to better science in less time using open data science tools](https://www.nature.com/articles/s41559-017-0160) ] ??? It looks like this. Shown here as the circles get smaller and moving up the y axis. It also go easier for us to collaborate each year, along the x axis. We couldn't overhaul everything all at once, but focused on different pieces incrementally each year. Having all of this coding infrastructure in place is what enables those 20 independent groups I mentioned to study ocean health in the places they care about. --- class: center, middle <img src="img/workflow-repro-wtext.png" width="100%" /> .footnote[ source: [OHI slides — WHOI](https://drive.google.com/open?id=1SHvJbBWrGVqzjAPos1jbtxSn_2DAl44JmDgY5v2NxC8) ] ??? --- class: center, middle <img src="img/workflow-full-wtext.png" width="100%" /> .footnote[ source: [OHI slides — WHOI](https://drive.google.com/open?id=1SHvJbBWrGVqzjAPos1jbtxSn_2DAl44JmDgY5v2NxC8) ] ??? --- ## RStudio for R, text editing, Github sync, & more <img src="img/workflow-ex-repro-wtext.png" width="100%" /> .footnote[ source: [OHI slides — WHOI](https://drive.google.com/open?id=1SHvJbBWrGVqzjAPos1jbtxSn_2DAl44JmDgY5v2NxC8) ] ??? --- ## GitHub for archiving and bookkeeping <img src="img/workflow-ex-collab-wtext.png" width="100%" /> .footnote[ source: [OHI slides — WHOI](https://drive.google.com/open?id=1SHvJbBWrGVqzjAPos1jbtxSn_2DAl44JmDgY5v2NxC8) ] ??? --- ## Github for discussion & project mgmt <img src="img/workflow-ex-collab2-wtext.png" width="100%" style="display: block; margin: auto;" /> .footnote[ source: [OHI slides — WHOI](https://drive.google.com/open?id=1SHvJbBWrGVqzjAPos1jbtxSn_2DAl44JmDgY5v2NxC8) ] ??? --- ## R + Github for docs & publishing <img src="img/workflow-ex-comm-wtext.png" width="100%" /> .footnote[ source: [OHI slides — WHOI](https://drive.google.com/open?id=1SHvJbBWrGVqzjAPos1jbtxSn_2DAl44JmDgY5v2NxC8) ] ??? --- <img src="img/horst-lowndes-loop-wtext.png" width="100%" /> .footnote[ art: [@allison_horst](https://twitter.com/allison_horst) ] ??? But remember, these tools are really most powerful with teams. --- # Data science mindset <br> <img src="img/r4ds_data-science.png" width="90%" style="display: block; margin: auto;" /> .footnote[ <br> [Wickham & Grolemund, 2016: "R for Data Science"](https://r4ds.had.co.nz/) ] ??? This graphic really changed they way we work and think. First, it separates the Understand part. This is this science part. It's an iterative process of transforming, subsetting, comparting data, vizulazing, modeling. And it's distinct from the import and tidying parts. This is critical. --- # Data science mindset <br> <img src="img/r4ds_data-science-lohr.png" width="90%" style="display: block; margin: auto;" /> .footnote[ <br> [Wickham & Grolemund, 2016: "R for Data Science"](https://r4ds.had.co.nz/) [Lohr, 2014 "For Big-Data Scientists, ‘Janitor Work’ Is Key Hurdle to Insights"](https://www.nytimes.com/2014/08/18/technology/for-big-data-scientists-hurdle-to-insights-is-janitor-work.html) ] ??? This graphic really changed they way we work and think. First, it separates the Understand part. This is this science part. It's an iterative process of transforming, subsetting, comparting data, vizulazing, modeling. And it's distinct from the import and tidying parts. This is critical. --- # Open data science tools <br> <img src="img/r4ds_data-science-tidyverse.png" width="60%" style="display: block; margin: auto;" /> .footnote[ source: [Hadley Wickham, 2019](https://speakerdeck.com/hadley/welcome-to-the-tidyverse?slide=28); web: [tidyverse.org](https://www.tidyverse.org/) ] ??? Expect there's a better way --- # Open mindset ### "transparency at all stages of the research process, coupled with free and open access to data, code, and papers" source: [*Hampton et al. 2015* The Tao of open science for ecology](https://esajournals.onlinelibrary.wiley.com/doi/full/10.1890/ES14-00402.1) -- ### "collaboration, empowerment, inclusivity, and accountability" ... "trust" ... "safe to be vulnerable" source: [*Wright 2019* Why bother with the “open” anyway?](https://medium.com/@stephanie_6761/why-bother-with-the-open-anyway-c76afb4dcb85) ??? I'd also add: Kindness --- # Ocean Health Index team traits .pull-left[ <br> <img src="img/horst-starwars-hands.png" width="100%" style="display: block; margin: auto;" /> ] -- .pull-right[ ### Circa 2013 **Horizontal leadership: jazzed about open data science** **Vertical leadership: enabling & supportive** **Team mindset: trusting and willing** ] ??? Teamwork started with trust and willingness. Not everyone codes. But everyone values --- # Ocean Health Index team traits .pull-left[ <br> <img src="img/horst-starwars-hands.png" width="100%" style="display: block; margin: auto;" /> ] .pull-right[ ### Circa 2013 **Horizontal leadership: jazzed about open data science** **Vertical leadership: enabling & supportive** **Team mindset: trusting and willing** ### Circa 2019 **Overlapping & complimentary skillsets** **Resilience: onboarding & offboarding** ] ??? We learned how to talk about data, how to think together about it. Bens enabled us to become leaders. horizontal leadership: evolve with the softwarescape --- # Ocean Health Index team strategies .pull-left[ ### Learn what's possible, how to teach & lead **rOpenSci • RStudio** • **RLadies • Mozilla • The Carpentries** ] .pull-right[ <img src="img/ods-community-logos.png" width="100%" style="display: block; margin: auto;" /> ] ??? --- # Ocean Health Index team strategies .pull-left[ ### Learn what's possible, how to teach & lead **rOpenSci • RStudio** • **RLadies • Mozilla • The Carpentries** ### Create skill-sharing spaces **Seaside Chats** • **Eco-Data-Science • RLadiesSB** • **OHI Fellows** ] .pull-right[ <img src="img/ods-community-logos.png" width="100%" style="display: block; margin: auto;" /> <img src="img/eds-rladies-hex.png" width="100%" style="display: block; margin: auto;" /> ] ??? This Reinforced shared values --- name: environ-comm-r4ds class: center, middle background-image: url(img/horst-eco-r4ds.png) background-size: contain .footnote[ .left[ <br> art: [@allison_horst](https://twitter.com/allison_horst); updated from [Wickham & Grolemund](https://r4ds.had.co.nz/) ] ] ??? So all of this together makes a possible for env science --- name: environ-comm-r4ds class: center, middle background-image: url(img/horst-eco-r4ds-env-comm-only.png) background-size: contain .footnote[ .left[ <br> art: [@allison_horst](https://twitter.com/allison_horst); updated from [Wickham & Grolemund](https://r4ds.had.co.nz/) ] ] ??? But this is where we are. And why is that? It's because we don't have the skills because we're never trained, but we aslso don't have the accompanying mindset and teamwork. --- <img src="img/horst-lowndes-loop-wtext.png" width="100%" /> .footnote[ art: [@allison_horst](https://twitter.com/allison_horst) ] ??? We're missing this feedback loop. It's hard to learn these tools if you feel like it's all on you and you're alone, and it's hard to engage with your team if there's no catalyst. Luke never would have imagined to expect that the Force existed unless he had seen it and learned it. He had heard about it and thought it was offlimits or some hokey thing. Individuals aren't aware of what's possible, and research groups aren't thinking like teams. We talk about science but not data. --- <img src="img/horst_openscapes_grassland_1500px-text-hex.png" width="100%" style="display: block; margin: auto;" /> ### We welcome scientists to open data science by mentoring research teams. **Engage**: build awareness and excitement with empathy, art, and storytelling **Empower**: connect with existing open software and communities **Amplify**: champion broadly to increase visibility, value, and practice .footnote[ web: [openscapes.org](https://www.openscapes.org); twitter: [@openscapes](https://twitter.com/openscapes) ] --- ### Openscapes inaugural cohort 2019 .pull-left[ <br> <img src="img/Cohort1_zoom.png" width="100%" /> .footnote[ web: [openscapes.org](https://www.openscapes.org); twitter: [@openscapes](https://twitter.com/openscapes) ] ] -- .pull-right[ ### Teams participate together **7x labs, leads & members from each lab** **1) everyone sees and values what is possible** **2) leads enable members to invest time** **3) members have guidance, agency, and support** **4) everyone champions open data science and contributes to growing the community of practice** ] ??? That's what we were did in this first cohort that I mentioned. Really focused on the teamwork side, but immediately around open data science and iteratively, make this a spiral And it's been exciting to not only see changes within labs, but across them, and new UW alliances. transition: really focused on enabling others --- ## Openscapes momentum .pull-left[ >"This isn’t just about coding and GitHub, this is about changing how we do science"— Dr. Malin Pinsky, Rutgers <img src="img/tweet-drchelsealwood-dorks.png" width="70%" style="display: block; margin: auto;" /> ] -- .pull-right[ <img src="img/tweet-mozilla-juliesquid-keynote.png" width="100%" /> ] ??? And there's been amazing momentum, both from mentees and for the program, which is awesome. We plan to have further cohorts, available for bookings and sponsorships. --- <img src="img/horst-starwars-yoda.png" width="88%" style="display: block; margin: auto;" /> .footnote[ art: [@allison_horst](https://twitter.com/allison_horst) ] ??? Advice for better science in less time: --- # Talk about data <br> <img src="img/nature-careers-supercharge.png" width="85%" style="display: block; margin: auto;" /> <br> <!--- **Normalize data discussions • Identify and address shared needs • Think ahead: Future You & Future Us** ---> ??? "Seaside chats", "Hacky hours", Coding clubs/meetups Establish trust, share challenges & wins, learn together 10-week plan. --- # Have a team mindset .pull-left[ ### Redefine collaborators **Research group as a team** • **Future you, future us** ### Redefine community **Online** • **Beyond your own discipline** ] .pull-right[ <img src="img/horst-seaside-chats.png" width="90%" style="display: block; margin: auto;" /> ] ### Reimagine challenges **Separate your science from your data • Expect there is a better way** • **Have confidence, agency, & community to solve them** • **You're not alone, it's not too late** ??? It's not your fault --- # Enable and support leaderful teams .pull-left[ ### Learn what's possible, how to teach & lead **rOpenSci • RStudio** • **RLadies • Mozilla • The Carpentries** ### Create skill-sharing spaces **Sea/Bay/Bluff/side Chats** • **Coding Clubs • Hacky hours / weeks** • **University courses** .footnote[ resources: [openscapes.org/resources](https://www.openscapes.org/resources) ] ] .pull-right[ <img src="img/horst-starwars-hands.png" width="100%" /> **trust** • **resilience** • **overlapping skillsets & interoperability** • **leadership • kindness** ] ??? Teams to me mean rings of people you respect, innovate with, and can rely upon. It does not have to be limited to a certain deliverable, location, discipline or anything else really. This trust really centers on respect for each other and also kindness. But on an individual level, we all have had to get comfortable with sharing things before they are perfect and being vulnerable to critique, which gets easier when you can assume the best intentions from anyone's feedback. But this has resulted in a really positive team culture, where we are comfortable with trying new things & learning from failure, and we are comfortable asking for help. --- # Engage with the \#rstats community .pull-left[ <img src="img/horst-welcome_to_rstats_twitter.png" width="100%" style="display: block; margin: auto;" /> .footnote[ art: [@allison_horst](https://twitter.com/allison_horst); blog: [openscapes.org](https://www.openscapes.org/blog/2019/01/15/personify-code/) ] ] .pull-right[ ### Follow selectively, listen, learn, meet awesome allies **\#rstats, @hadleywickham, @JennyBryan, @WeAreRLadies, @rOpenSci** **@openscapes, @nceas, @OHIscience, @EcoDataScience** **@pinskylab, @ntherk, @DocFroehlich, @AdrianStier, @allison_horst, @DrChelseaLWood** ] --- <img src="img/horst_openscapes_arctic_1500px.png" width="100%" style="display: block; margin: auto;" /> ### Get involved with Openscapes & open data science .pull-left[ **Follow us on Twitter @openscapes** **Join our mailing list** **Talk with your colleagues** ] .pull-right[ **Amplify through media and events** **Book or sponsor Champions Cohorts and Workshops** **Email us with your ideas** ] .footnote[ get involved: [openscapes.org/contact](https://www.openscapes.org/contact) ] --- name: environ-comm-r4ds class: center, middle background-image: url(img/horst-eco-r4ds.png) background-size: contain .footnote[ .left[ <br> art: [@allison_horst](https://twitter.com/allison_horst); updated from [Wickham & Grolemund](https://r4ds.had.co.nz/) ] ] --- exclude: TRUE <img src="img/horst_openscapes_desert_1500px.png" width="100%" style="display: block; margin: auto;" /> .pull-left[ ### Parting thoughts **Collaborative mindset: Future You** **Team mindset: Us and Future Us (redefined)** **Expect there is a better way; abstract the problem** **Open science is kinder science** ] .pull-right[ <img src="img/horst-lowndes-loop.png" width="100%" /> ] --- # Thank you all so much .pull-left[ #### especially for this talk: ###OHI team <br>Mozilla team<br>Openscapes Champions<br>Allison Horst <br> ####all artwork: [@allison_horst](https://twitter.com/allison_horst)<br>xaringan theme: [@apreshill](https://github.com/apreshill/talks/blob/master/uo-sad-plot-better/index.Rmd#L7) ] .pull-right[ <br> <br> ### Please get involved: [openscapes.org/contact](https://www.openscapes.org/contact/); [@openscapes](https://openscapes.org) #### Find me for stickers... <img src="img/openscapes-hex.png" alt="" style="float:right;width:80px;"/> <img src="img/ohi-hex.png" alt="" style="float:right;width:80px;"/> ] ??? Thank you. --- class: title-slide, right, bottom background-image: url(img/horst-starwars-rey.png) background-size: contain background-position: bottom left ## R & friends for better science in less time<br>in big (& small) team collaborations ### Julia Stewart Lowndes, PhD ### National Center for Ecological Analysis & Synthesis, UCSB [
@juliesquid](https://twitter.com/juliesquid) [
lowndes@nceas.ucsb.edu](mailto:lowndes@nceas.ucsb.edu) [
openscapes.org/media](http://openscapes.org/media) <img src="img/mozilla.png" alt="mozilla" style="float:right;width:154px;"/> <img src="img/nceas.png" alt="nceas" style="float:right;width:150px;"/> --- --- .pull-left[ <br> <img src="img/tweet-Md_Harris-rnoaa.png" width="100%" /> .footnote[ tweet: [@Md_Harris](https://twitter.com/Md_Harris/status/1074469302974193665/photo/1) ] ] .pull-right[ <br> <br> ### My internal monologue: **Cool visualization!** **I want to represent my data this way** **He includes [his code](https://gist.github.com/mrecos)!** **Package from [@sckottie](https://twitter.com/sckottie) at [rOpenSci](https://ropensci.org)** **rnoaa is a package making NOAA data more accessible!** ] --- class: center, middle <img src="img/tweet-docfroehlich-rnoaa-full.png" width="60%" style="display: block; margin: auto;" /> .footnote[ tweet: [@DocFroehlich](https://twitter.com/DocFroehlich/status/1085990833571020800) ] ??? Halley has a big science following already and now tweets also about open data science, so this is a great example of the influence these champions are already having. --- <img src="img/tweet-apreshill-rladies-sydney.png" width="60%" style="display: block; margin: auto;" /> .footnote[ twitter: [@apreshill](https://twitter.com/apreshill/status/1184660994007519232); web: [RLadies Sydney](https://rladiessydney.org/courses/ryouwithme/) ] ??? https://twitter.com/WeAreRLadies/status/1087741684618809346 https://twitter.com/frau_dr_barber/status/1127189812308369408