MASTERING YOUR DATA – FROM EXPLORATION TO VISUALIZATION

RSU Introduction to Data Science with R and Tidyverse

Description

The traditional approach to research programs is to assume that students will find a way to analyze and visualize their data. This assumption brings problems for the students, their supervisors, and a significant waste of time. Many students are scared by the data rather than curious and usually skip exploratory data analysis and go straight to advanced statistical models that they cannot explain later because they do not understand their data in depth. 

This course aims to provide basic knowledge, skills and tools to perform such an exploratory data analysis, with a major focus on publication-ready data visualization to detect patterns and trends in the data, to extract meaningful information from the data and to prepare for further inferential analysis.

On successful completion of the course, the students will have the knowledge and practical skills to successfully apply the R statistical software and its essential functions and packages to wrangle and transform their research data to perform informative exploratory analyses and create publication-ready visualization of their data, enabling effective interpretation and communication of the research results and findings to the scientific community.

About the lecturer, prof. Sergio Uribe: Hi! I am a Maxillofacial Radiologist (DDS, PhD) and Clinical Researcher. My research focuses on developing and evaluating strategies for enhanced oral health, particularly caries and temporomandibular conditions. Through analysing valid and reliable clinical studies' epidemiological data and utilising cutting-edge technologies, including artificial intelligence applications, my objective is to enhance diagnostic accuracy and prognosis,, and positively impacting on oral health. Furthermore, I strive to provide valuable insights and innovative solutions that advance the dental field. For updates on my research and related topics, you can follow me on Twitter @sergiouribe. If you have any inquiries or wish to reach out, please feel free to email me at sergio.uribe@rsu.lv.

LinkedInORCID - RSU Science Portal - sergiouri.be

Download and print the Cheat Sheets

Print preferable in color

Books

These books are free to access and read.  Click on any of them for more information. 

Wickman's book is indispensable. He is the creator of several of the packages included in tidyverse, such as dplyr, ggplot, and tidyr among others. 

Modern dive is a general guide to doing data science. 

The next two books, Healy and Wilke, covers practically everything that allows you to make high-quality visualizations, from theory to practice, with code included.

Lastly, the Big Book of R is a consolidated list of online resources, useful to bookmark. 

Also, two books that show the power of using data to generate information are Factfulness from Rosling and Enlightenment now by Pinker. These books show, with data, the current state of the world and have simple graphs, but whose elaboration shows how it should be the proper process to express ideas through graphics. 

Healy

Wilke

Chang

Wickham

Ismay & Kim

Important: all your data must be correctly formatted!

Compulsory reading: Data Organization in Spreadsheets

Data organization: folders, files and projects 

How to name things slides

First session

01 RSU Mastering your Data Published .pdf

Lectures First Session

A ggplot2 Tutorial for Beautiful Plotting in R: Blog post: https://cedricscherer.netlify.app/2019/08/05/a-ggplot2-tutorial-for-beautiful-plotting-in-r/

Datawrapper GmbH, 2020. How to pick more beautiful colors for your data visualizations [WWW Document]. URL https://blog.datawrapper.de/beautifulcolors/ (acceded 9.5.20).

A detailed explanation about how to choose the colors for your graphics

Evanko, D., s. f. Data visualization: A view of every Points of View column : Methagora [WWW Document]. URL http://blogs.nature.com/methagora/2013/07/data-visualization-points-of-view.html (accedido 5.13.19).

A list of articles published in Nature that deal in detail with the subject of generating quality graphics. Each article is one or two pages, super practical. 

Holtz, Y., s. f. The R Graph Gallery [WWW Document]. URL https://www.r-graph-gallery.com/ (accedido 10.13.20).

A graphic gallery with ggplot2 with code


Second session

Lectures pre-session

02 RSU Mastering your Data Published.pdf

Code: Second session

Self-tutorial: https://rstudio.cloud/learn/primers/3

Cheat sheet data visualization

Which chart use

Data Viz chart here

Which colors to use? 

Different charts in R r-charts

Cheatsheet - 70+ ggplot Charts here

Third session

Copy of RSU Mastering your data Data Science EDA Data Visualization Course

Fourth session

How to download the code

Fifth session

Data Management Plan (DMP)

Data Management Plan

Readings

Wilkinson et al., 2016. The FAIR Guiding Principles for scientific data management and stewardship. Sci Data 3, 160018.https://www.nature.com/articles/sdata201618

Checklist for Data Management Plan

Here is a checklist to consider as you write your NSF Data Management Plan (generic):

Template for Data Management Plan

[ Note: This DMP describes how the project will conform in the RSU Dataverse  recommedantion on dissemination and sharing of research results, including the requirement to “share with other researchers, at no more than incremental cost and within a reasonable time, the primary data, samples, physical collections and other supporting materials created or gathered.” In addition, check for specific directorate/program requirements.]

1. Data description

[ Briefly describe nature & scale of data {simulated, observed, experimental information; samples; publications; physical collections; software; models} generated or collected. ]

2. Existing Data [ if applicable ]

[Briefly describe existing data relevant to the project; added value/justification of new data collection/generation; and plans for integration with existing data]

3. Audience

[ Briefly describe potential secondary users; scope and scale of use]

4. Access and Sharing All data collected or generated will be deposited in the RSU Dataverse. The RSU Dataverse is a public repository, hosted and maintained by RSU University Information Technology (HUIT). The RSU Dataverse facilitates data access by providing descriptive and variable/question-level search; topical browsing; data extraction and re-formatting; and on-line analysis.

All data will be deposited at least 90 days prior to the expiration of the award. Such data may be embargoed until the publication of research based on the data or until 1 year after the expiration of the award, whichever is sooner. Users will be required to agree to click-through terms that prohibit unlawful uses and intentional violations of privacy, and require attribution. Use of the data will be otherwise unrestricted and free of charge.

5. Formats

Immediately after collection, quantitative data will be converted to [ SELECT ALL THAT APPLY: Stata, SPSS, R, Excel, CSV] formats. These formats are fully supported by the RSU Dataverse, which will perform archival format migration; metadata extraction; and validity checks. Deposit in these formats will also enable on-line analysis; variable-level search; data extraction and re-formatting; and other enhanced access capabilities. Documentation will be deposited in PDF/a, or plain-text formats, to ensure long-term accessibility, with any accompanying sound (in WAV), video, or images separate from the documentation deposited as JPEG 2000 files (with lossless compression) or uncompressed TIFF files.

6. Documentation, Metadata and Bibliographic Information

The project will create documentation detailing the sources, coding, and editing of all data, in sufficient detail to enable another researcher to replicate them from original sources; and descriptive metadata for each dataset including a title, author, description, descriptive keywords, and file descriptions. The project will include bibliographic information for any publication by the project based on that data.

The Dataverse application’s “templating” feature will be used for consistency of information across datasets. The Dataverse repository automatically generates persistent identifiers, and Universal Numeric Fingerprints (UNF) for datasets; extracts and indexes variable descriptions, missing-value codes and labels; creates variable-level summary statistics; and facilitates open distribution of metadata with a variety of standard formats (Data Cite, DDI v 2.5, Dublin Core, VO Resource, and ISA-Tab) and protocols (OAI-PMH, SWORD).

[ If applicable, briefly describe additional metadata/documentation to be provided; standards used; treatment of field notes and collection records; and quality assurance procedures for all of these ]

7. Storage, backup, replication, and versioning

The Dataverse repository provides automatic version (revision) control over all deposited materials and no versions of deposited material are destroyed except where such destruction is legally required. All systems providing on-line storage for the Dataverse are contained in a physically secured facility that is continually monitored. System backups are made on a daily basis. [For social science data: ] Replicas of data are held by independent archives as part of the Data-PASS archival partnership, regularly updated, and regularly validated, using the LOCKSS system.

8 . Security

The RSU Dataverse complies with RSU University requirements for good computer use practices. RSU University has developed extensive technical and administrative procedures to ensure consistent and systematic information security. “Good practice” requirements include system security requirements (e.g., idle session timeouts; disabling of generic accounts; inhibiting password guessing) operational requirements (e.g., breach reporting; patching; password complexity; logging ); and regular auditing and review.

9. Budget

The cost of preparing data and documentation will be borne by the project, and is already reflected in the personnel costs included in the current budget. The incremental cost of permanent archiving activities will be borne by RSU Dataverse.

[IF the data requires storage over 5GB, cannot be ingested using the acceptable formats above, requires extensive documentation, or is unusually complex in structure include: Staff time has been allocated in the proposed budget to cover the costs of preparing data and documentation for archiving for [describe complexities and management]. RSU has estimated their additional cost to permanently archive the data is [insert dollar amount, to be agreed with Dataverse Project team at RSU]. This fee appears in the budget for this application as well. ]

10. Privacy, Intellectual Property, Other Legal Requirements

Information collected can be released without privacy restrictions because [ it does not constitute private information about identified human subjects; informed consent for full public release of the data will be obtained; the data will be anonymized using an IRB-approved protocol prior to the conduct of analysis ]. The data will not be encumbered with intellectual property rights (including copyright, database rights, license restrictions, trade secret, patent or trademark) by any party (including the investigators, investigators’ institutions, and data providers.); nor is subject to any additional legal requirements. Depositing with the RSU Dataverse does not require a transfer of copyright, but instead grant permission for the RSU Dataverse to re-disseminate the data and to transform the data as necessary for preservation and access.

11. Archiving, Preservation, Long-term Access

The RSU Dataverse commits to good archival practice, including independent geo-spatially distributed replication, a succession plan for holdings, and regular content migration. Should the archiving entity be unable to perform, transfer agreements with the Data-PASS partnership ensure the continued preservation of the data by partner institutions. All data under this dataset will also be made available for replication by any party under the CC-attribution license, using the LOCKSS protocols – which is fully supported by the Dataverse application.

12. Adherence

[If not the PI, briefly describe who/which project role is responsible for managing data for the project]

Adherence to this plan will be checked at least ninety-days prior to the expiration of the award by the P.I. Adherence checks will include review of the RSU Dataverse content, number of datasets released, availability for each dataset of subsettable/preservation friendly data formats (possibly embargoed, but listed); availability of documentation (public); and correctness of data citation, including UNF integrity check.

Data Management Tool for DMP creation

Click https://dmptool.org/ link to open resource.

Template Data Management Plan (DMP) Horizon 2020

Template download

Final project

When you have a question, for example "how do I limit the y-axis in ggplot2" you will most likely google it. Some recommendations to make your search more efficient: 

Seminar examples

Tips and tricks

Some Open databases

Learn more

Biomedical interest


Social / Media / Humanities interest

Data cleaning

WHAT IT TAKES TO TIDY CENSUS DATA

Janitor package and tidyxl, useful to clean dirty excel files

General visualization

Tables

Statistics

Courses

Documentation

Utilities

Collaboration

More tricks

dplyr::relocate()

dplyr::count() / n()

dplyr::distinct()

dplyr::glimpse()

dplyr::slice()

ggplot2::geom_count()

Data cleaning

Tricks and Secrets for Beautiful Plots in R