How to upload data to Datawrapper
Before creating a chart, you need data. This is the first thing Datawrapper asks of you, in step 1: Upload Data. Here we cover how your data needs to look like to be accepted by Datawrapper without problems, and the five ways in which you can upload your data.
How does the uploaded data need to look like?
Datawrapper needs "clean" data coming from your spreadsheet. In almost all cases where users contact support and report that their data was not uploaded as expected, the improper formatting of the data is the reason.
That's how your data should look like:
- Numbers should come without extras. This is the most essential point. If you upload numbers, make sure that they don't have currency signs, percentage signs etc. Instead of uploading values as "$1,293.20", upload them as "1,293.20". You can easily add pre- & suffixes in step 2: Check & Describe.
- Each row should have data. Before the data starts in e.g. in the tenth row, Excel workbooks often have explanations, logos of institutions or empty rows. These rows need to be deleted.
- The first row of your data should have column headers. We will refer to these column headers throughout the tool, so make sure that e.g. a column with unemployment rates has the header "unemployment rate" in its first row.
- Each cell should have one value. Each cell needs one date, one number or text. E.g., cells with the content "01/09/2018 London" won't be interpreted as a data and a text, but just as text. If you want Datawrapper to understand the date, put it in an extra column.
- Blank cells are ok. Cells without any content will be shown in step 2: Check & Describe as "null". That can be ok for lots of chart types; Datawrapper will still display the rest of the data. However, if it makes sense, consider replacing the nulls with zeros.
- No footnotes. Footnotes in cells (e.g. "1,303[1]") or before/below the data rows need to be deleted. Datawrapper won't be able to understand "1,303[1]" as the number "1,303".
If you're curious about our data formats (date, text, numbers) and how to make sure that Datawrapper interprets them right, visit this tutorial. If you want to learn how to change/correct your data directly in Datawrapper, visit this tutorial. If you want to learn how to change the number format (e.g. from "32,0002" to "32"), visit this tutorial.
You can also create new columns based on old ones. E.g., you can sum the values from two columns together. Go to this tutorial to learn how.
How to upload data in Datawrapper
We offer five options to upload your data into Datawrapper:
- Copy & paste the data from the spreadsheet into Datawrapper.
This workflow is covered in this tutorial and is the easiest way to get your data uploaded - Import your data from a .csv (comma separated values) file: Tutorial
- Import your data from an Excel file
- Link to a Google Sheet: Tutorial
- Create a data source and connect it to Datawrapper for automatic updates (e.g. for an election): Tutorial
As you can see, we covered slightly more difficult ways with a Tutorial. Here we go through all of them as an overview:
1. Copy & Paste
Simply copy data in the spreadsheet, then paste. You can do this with the commands Strg+C / (Windows) or Command+C (Mac) for copying and Strg+V / Command+V for pasting, or with the built-in menus.
2. Import an .csv
Comma separated values are easy to digest for Datawrapper. You might download .csv's from government institutions or tools like Google Trends. Datawrapper makes it easy to upload them: Click on "XLS/CSV upload" to open a window where you can choose your CSV......
...or simply drag & drop the CSV into the Datawrapper window:
3. Import your data from an Excel file
Datawrapper can import your Excel / OpenOffice / LibreOffice spreadsheets as well (basically every file with the extensions XLSX, XLS, ODS, CSV, TSV, TXT or DBF). If the document contains multiple sheets, you will be asked to select the one you want to import:
Note that we’re still only storing the one sheet you chose to import. So if you want to access the other sheets later, you’ll need to upload the file again.
4. Link to a Google Sheet
You can now connect your Google Sheets with Datawrapper directly. If you update your data frequently, this might be easier than to copy & paste the data all the time. To connect Datawrapper with Google Sheets, you need to make sure that Link Sharing is activated for the document and then paste the Google Sheet URL into Datawrapper:
Datawrapper updates your data from your Google Sheet every time you open the chart or reload the site. You don’t need to worry about the fact that all your published charts have to be updated every time you make changes to your Google Sheet. You just need to re-publish your chart again before the new data becomes visible.
5. Create a data source and connect it to Datawrapper
Sometimes, you do want a chart to update as soon as the data updates, for example in an election. We now offer a way to do so. Even in published charts, the data will be kept up-to-date. That means that for every chart view, the data will be downloaded freshly from the original URL. This can be a bit tricky, technology-wise. To make it easier, we take care of the complicated stuff for you. We decided to throw in a free data hosting service. Meaning, you just upload the CSV to e.g. your website, Github, etc. From there we copy the data to our own server in certain intervals (every minute on the first day, then every hour the next 29 days), and your Datawrapper chart will pull the data from there.