Today is the day! Data Management in Large-Scale Education Research is officially out in stores and online!
@CRCPress
The open access version will remain freely available as well here!
For 2 years I have worked on this
#rstats
resource. It's a collection of functions used to wrangle data, especially in the field of ed research. Functions are organized by task (such as naming variables), and examples of how to use functions are provided.
Over the years, I think the reason I have slowly pivoted my focus from data analysis to data managment is b/c I've seen so much mismanagement of data, in every sector, that I am concerned how many findings are based off bad data. Not bad analysis, but incorrect data. (1/2)
Looking for a standardized list of steps for cleaning data for the purposes of data sharing? I've got a checklist for you! Each step explained in detail here:
After losing my mind for a while, I finally figured out how to reference variables in a function using {{ }}, and how to create dynamic variable names using := 😳
#rstats
I received physical copies of my book and it's difficult to contain my excitement! I spent 2.5 years researching, writing, and revising this content and I'm so happy with how it turned out. Currently available for pre-order! Ships after July 9!
I had no idea the
#rstats
"todor" Addin existed for RStudio. Thank you to
@charliejhadley
for pointing this out. I can finally easily find my future notes to myself!
Codebooks are excellent summary tools for both reviewing and documenting a dataset. There are several
#rstats
packages that can quickly create codebooks from existing datasets. Learn about a few of them here.
Because I'm so excited about the official release of my book tomorrow, I wanted to share other open access books that everyone should check out!
1.
2.
3.
4.
5.
If you use
#rstats
#tidyverse
but still don't fully grasp concepts such as what is ~, why do we sometimes add .x in a function, or what is NSE, I "attempted" to demystify some of these concepts as part of my ed data wrangling resource.
When running a research project you will have tons of files to store (data, reports, forms, etc.). Before a project begins, take time to organize your folder structure so that you consistently name and store those files in way that makes them easy to find and use.
(1/4) When publicly sharing your data it's important to share documentation along with your data. Readmes, data dictionaries, and project documentation can ensure that future users understand both the contents and context of your data. Templates in comments below.
#edresearch
It's been a while since I've shared this resource. If you are looking for help wrangling education data in
#rstats
, this wiki provides code examples organized by common tasks.
If you ever need to move files around in your directory,
#rstats
can help do this quickly, especially when you are working with hundreds of files! Here is just one way you might quickly sort and copy files into a new location.
My periodic reminder that if you are looking for examples of how to structure a repository for public data sharing, as well as what documentation to share along with your data, I created an example project here on
@OSFramework
!
As I'm running a script to check for entry errors today, I want to remind everyone to never assume your data entry process is error-free. No matter how careful your team is, errors are always possible. Double entry helps catch errors early on!
Earlier this summer
@ibddoctor
,
@PipingHotData
, and I gave a workshop on cleaning data in R for the R/Medicine Conference. Not sure when the recording will be available but the slides are available here for anyone who is interested!
#rstats
I 🧡 {pointblank} for validation. It notifies you if your tests fail (ex: values out of range), and provides a csv to review cases that fail each test! It works great in conjunction with a data dictionary where you have predefined expectations for your vars!
#rstats
#edresearch
Restructuring your longitudinal data from long to wide OR wide to long format is a fairly painless process in
#rstats
, especially when you consistently name your variables using controlled vocabulary. 🌟
Full script here:
I've been working with
#rstats
dplyr::rows_update a lot lately and just a word of warning to the other users, this function will update *all* values (note the grade level change to NA below). If you only want to update NA values, use dplyr::rows_patch. 🌟
Do you have a dataset with some missing values, and another form with the missing values completed? Yesterday I was reminded about the rows_update()
#rstats
function!
Nobody will remember:
- your salary
- how “busy you were”
- how many hours you worked
people will remember:
- that data you shared without good documentation
Recently a researcher gave me a dataset, and I asked:
What do the values (1,2,3,4) of this variable mean?
Their response:
The categories are in order in Qualtrics, so the values should be in order.
Me:
Are you sure about that? 😉
#alwayscheck
I decided to do another week of
#rstats
code for common
#edresearch
data cleaning problems! 🤘 Today I'm sharing a simple solution for renaming many variables at once using an existing data dictionary. I use this method all the time in my work and it saves me so much time!
If there is only one thing that researchers can do to improve the quality of their data, they should create data dictionaries before collecting any data. Plan for what you want to see in your final datasets. This planning leads to more usable data.
Why I like data cleaning plans.
When you want feedback on the transformations you completed on your data, it can be overwhelming to share your code with team members.
A data cleaning plan simplifies that conversation.
When appending (stacking) datasets, variable names and types must be consistent across datasets. It's helpful to check these assumptions before appending your files. The
#rstats
janitor::compared_df_cols() is great for this.
It's so important to use controlled vocabularies in your variable names (consistent phrases). Not only do they make your variable names easier to interpret, they also allow you to easily retrieve and manipulate variables programmatically. See these examples in R. 👇
#rstats
I've been spending a lot of time thinking through how we move from just knowing data management best practices, to creating an actual workflow that a team can implement. As always, feedback is welcome.
I had such a great time talking about 10 common data management mistakes with the
@ssspecf
today! Thank you to everyone who joined. Slides are available here!
The times I feel happiest in my work are those when I am helping people organize their data, teaching people (and learning new) data management best practices, and writing data cleaning scripts for really gnarly data. Is that weird? Sharing knowledge and data cleaning. Bam.
Cool resource alert! 🚨
@Key2STATS
has a repository of open datasets available to use for example purposes. You can either download them or interact with them in their R coding interface.
Once upon a time some of my data management templates were featured in Nature. 😍 Unfortunately they all lived in Google Drive at the time. They now live on OSF. :)
I created a table to compare
#rstats
packages that are useful for creating codebooks based on 15 criteria. My eyes are getting blurry from staring at this for so long so if I have misrepresented a category for any package, let me know!
ISO people's favorite
#rstats
packages to make codebooks. Something similar to an SPSS codebook that has each var info self-contained:
- var name
- var label
- var type
- values and value labels
- NA values and labels
- Total N
- N and % percent per category including NA
Working on another data dictionary today, I am reminded again how important these documents are in the research life cycle. Creating data dictionaries early on creates a roadmap for your entire project, leading to more high quality and usable data.
FYI, base
#rstats
rounds to the even number at .5, rather than always rounding up.
1.5 -> 2
2.5 -> 2
If you want to to always round up at .5, you can use janitor::round_half_up().
Data Management in Large-Scale Education Research () includes a collection of checklists, templates, and examples to help you organize your data management workflows. All supplemental materials for the book can be found on OSF here:
It's difficult for others to use your data without first reading documentation. Sharing a data dictionary or codebook alongside your data ensures that users correctly interpret variables. A few examples and templates can be found here:
This project provides an example of the data products a researcher may choose to publicly share at the end of a research project, and how they can facilitate reuse by structuring those products in a clear and organized way.
I started with base R back in 2011 and it never clicked for me. I tried for years to use R and never liked it. Then I found the tidyverse and started using it exclusively and it finally clicked. And now I actually understand base R better. Use what works for you.
Good morning.
If the only things you’ve ever done with R rely on the “tidyverse,” you don’t know R, and can’t claim to.
Be sure your students know this.
Today for Love Data Week I am sharing "The Basics of Data Management", an excellent data management primer, especially for those collecting human subjects data in the field.
#lovedata24
💜
I'm so excited to let everyone know that I have signed a contract with
@CRCPress
to publish my book! Grateful for the help of
@crcgrubbsd
in this process! Once published, the online version will remain freely available as well. 🌟
#edresearch
#datamgmt
Yesterday I reviewed ~30 open datasets and there was a spectrum of quality. While I don't believe all data need to be identically formatted, I do think data should meet these standards and include thorough documentation (e.g., a data dictionary and project summary).
Is training your team on good data management practices a bucket list item for you this year?
Do you have a new grant that you would like to get started on the right foot, or existing projects that you want to better organize?
I can help! Learn more:
Project style guides are excellent tools for ensuring that team members consistently name and structure folders and files as well as dataset variable names and values. Style guides improve interpretation, usability, and reproducibility of files.
Learn more
Even with the best data management practices in place, it's good practice to assume some amount of error is inevitable.
Always review your datasets for mistakes before finalizing them. See
#16
in this checklist for examples of how to conduct checks.
Ever have multiple datasets, maybe collected longitudinally, that you need to combine into a larger dataset? What is the best way to combine them and how can we combine them using
#rstats
? Check out this blog for ideas!
A question I’ve always wanted to ask: Is there any reason I should not use R Notebooks for data cleaning? I have no output that needs to be rendered but I like organizing my steps in code chunks. It makes my code more readable than adding comments to syntax.
#rstats
The best way to code missing data is a divisive topic. There is very little agreement on which method to use. Here's an interesting table from this 2013 publication:
Data management can feel overwhelming. Where to begin? Which practices should I use and when should I implement them?
This Appendix summarizes common activities that occur in each phase of research into a digestible list for your project.
#edresearch
Also, I finally decided to share my new website! It took me a bit. Believe it or not, I actually really dislike promoting myself, not a great trait for an entrepreneur! :) Check the site for current and future
#datamgmt
and
#rstats
content!
Quick introduction for new followers!👋
I’m a freelance research data management consultant. I share resources on how to create better project workflows. I also recently finished this book which will be available in print soon but is also open access here:
Is your longitudinal data currently in long format, but you need it in wide format, or vice versa? No worries! It is easy to restructure your data in R using the {tidyr} package.
#rstats
You can find more examples here:
Creating style guides for your projects (rules for formatting information) improves interoperability, interpretation, and reproducibility.
It is helpful to have style guides for:
✔️Structuring directories
✔️Naming files
✔️Naming variables
Learn more here:
I have finally finished the next module in my education data mgmt training series: Writing a data cleaning plan! I hope this is helpful for all education researchers looking for data management guidance! Feedback welcome!
#edresearch
#datamgmt
I need to remember to always double my estimate of how long I think it will take me to clean data. I'm always so optimistic! And then I start digging in and seeing what is really going on.
It's Friday! And I'm so happy that I've written another chapter for the book (and revised several others). Only 3 more chapters to write in 5 weeks. I can do this right? 😂🙏
I am so excited that
@rfortherest
is starting this email series: What's New in R!
I was just talking about how difficult it is to keep up with the latest developments, especially with the dwindling
#rstats
community. If you are interested, sign up here:
In our workshop today I shared this resource with many
#rstats
users who are looking for help getting started with common data wrangling functions. This wiki might be helpful for you as well.
If you've been looking for a list of research data management resources you can share with your team or students, look no further! I've compiled my go-to resources in my first ever blog post! ✍️
I hope it’s helpful!
#datamgmt
#edresearch
In
@SamanthaCsik
's talk last night, we googled alternate ways to work with case sensitivity in
#rstats
{stringr}. Normally I first mutate the column to lower case, but more simply you can add regex (with the argument "ignore_case") or add (?i)! 🤯
Sometimes I worry that the data mgmt info I share is too basic. But I continue to see poorly managed data and I'm reminded that many of us aren't taught how to manage data and that while organizing data may seem "basic" in theory, it is actually fairly complicated in practice.