Overview
Teaching: 10 min
Exercises: 5 minQuestions
How can we save and export our cleaned data from OpenRefine?
Objectives
Save an OpenRefine project.
Export cleaned data from an OpenRefine project.
In OpenRefine you can save and export an entire project, or a spreadsheet of the cleaned data. This means you’re saving the data and all the information about the data cleaning and transformation steps you’ve done. By default, OpenRefine saves your project in its memory while you make changes to the data. If you close OpenRefine without exporting, you can still open it up again and see a list of your projects, then click on any one of them to open it up again. However, exporting your data or project allows it to be shared with others, stored elsewhere online or on your computer, and creates a record of the steps made to transform the original dataset.
To export just the cleaned data into a spreadsheet format:
Export
in the top right and select the file type you want to export the data in. Tab-separated values
(tsv
) or Comma-separated values
(csv
) would be good choices.Download
directory. That file can then be opened in a spreadsheet program or imported
into programs like R or Python.Exporting a project is also helpful, for instance, if you wanted to send your raw data and cleaning steps to a collaborator, or share this information as a supplement to a publication. To export a project:
Export
button in the top right and select Export project
.tar.gz
file will download to your default Download
directory. The tar.gz
extension tells you that this is a compressed file.
Which means that this file contains multiple files. You can double-click on the tar.gz
file and it will expand into a directory. A
folder icon will now appear.Solution
You should see:
- a
history
folder which contains threezip
files. Each of these files itself contains achange.txt
file. Thesechange.txt
files are the records of each individual transformation that you did to your data.- a
data.zip
file. When expanded, thiszip
file includes a file calleddata.txt
which is a copy of your raw data. You may also see other files.
You can import an existing project into OpenRefine by clicking Open...
in the upper right > Import Project
and selecting the tar.gz
project file. This project will include all of the raw data and cleaning steps that were part of the original project.
Key Points
Cleaned data or entire projects can be exported from OpenRefine.
Projects can be shared with collaborators, enabling them to see, reproduce and check all data cleaning steps you performed.