## 1. Project Overview & Quickstart (overview/data_privacy)

# data_privacy

Open-source repository overview/data_privacy

### Repository Details
- **Repository:** [overview/data_privacy](https://github.com/overview/data_privacy)
- **Primary Language:** Code

*Note: High-volume repository documentation is actively indexed and synchronized by YakaAI.*

## 2. Official Technical Reference & Guides (overview/overview.github.io)

## File: docs/case-studies/analyze-social-media-posts.md

---
title: How to use Overview to analyze social media posts
parent: Case Studies
grand_parent: Overview Help
nav_order: 1
---


# How to use Overview to analyze social media posts

Even when 10,000 people post about the same topic, they’re not saying 10,000 different things. People talking about an event will focus on different aspects of it, or have different reactions, but many people will be saying pretty much the same thing. People posting about a product might be talking about one or another of its features, the price, their experience using it, or how it compares to competitors. Citizens of a city might be concerned about many different things, but which things are the most important? Overview’s document sorting system groups similar posts so you can find these conversations quickly, and figure out how many people are saying what.

This post explains how to use Overview to quickly figure out what the different “conversations” are, how many people are involved in each, and how they overlap.

__Step 1: Get the data into Overview__

Overview does not capture or scrape social media. Fortunately, there are lots of other monitoring tools to do that, such as Radian 6, Sysomos, and Datasift. Overview can read data exported from each of these tools as CSV files. This is a simple file format used by spreadsheet programs, so if you can open it in Excel, you should be able to import it to Overview. Or, you can create your own files in this format.

Then upload the file into overview. Select “Import a New Document Set” as usual, then choose “CSV upload” and select your file. Overview will check the file for errors and show a preview of the file, like this:

If it all looks good, click Upload.

__Step 2: Explore your documents__

Overview reads the full text of each post — not just names and keywords — and groups similar documents together into different folders. Then it takes each folder, and groups similar documents into sub-folders, and so on. The folder tree shows how Overview has organized your posts.

There won’t always be strictly one type of “conversation” per folder, because conversation is a fuzzy concept, and Overview doesn’t know how you want to categorize things. But all the documents in the folder will be the same in some way — or if the folder seems to include too many different types of posts, try exploring the sub-folders, which have narrower topics.

As you select each folder, Overview shows a list of the posts in that folder in the bottom left. Each post is summarized by the most “characteristic” words in that post — not the words that are most common, but the words that make the documents in that folder different from the documents in other folders.

It’s the tags you create that define which conversations you’re interested in. These might be very broad categories such as “positive” and “negative,” or much more specific tags such as “didn’t like the color.” Generally, you’ll explore the documents top-to-bottom and left-to-right, inventing and assigning tags as you go. You can assign tags to one document at a time if you like, but usually you’ll want to assign a tag to all documents in the folder at the same time. To do this, select the folder, then move the mouse over the tag and press the + button.



Tags are non-exclusive, meaning that each document can have as many tags as you like.

__Step 3: Export your data__

Now that you’ve seen what’s in your data, and tagged it for future reference, you probably want to use these results in some way. You can see how many documents have each tag just by selecting that tag. Or, you can export your entire document set, including the tags you just added. The export button is on the document set list page. It creates a spreadsheet (CSV file) and gives you a choice how you want your tags.



Each document will be one row in the speradsheet. If you put all tags in one column they will be separated by commas, like “Sunshine, Positive.” But putting each tag in its own column makes it easy to do things like find all the documents that have a specific tag, or take column totals to get the number of documents with each tag — useful for making a visualization of your results, like this visualization of 16,000 tweets about drones (created with Overview by Tempero UK):

---

## File: docs/case-studies/topic-tree.md

---
title: Topic tree - Organize documents into folders
parent: Case Studies
grand_parent: Overview Help
nav_order: 2
---


# Topic tree - Organize documents into folders

Before computers, all document-driven stories started with a big stack of paper. Often, the first task was to organize all that paper, by sorting individual documents into piles by type. This gives journalists a high-level idea of “what’s in there” and helps them decide what to read more closely — and just as importantly, what isn’t worth reading.

Today a computer can organize your documents for you. That stack of paper may now be a folder full of PDF files, but it still doesn’t come with any sort of built-in index or obvious categorization system. This is exactly the problem that Overview solves: It splits documents into piles based on their subjects, and then splits each pile into even more specific sub-piles, and so on. The result is a tree of folders.



Above is part of the folder tree that Overview automatically built for the 6,849 documents containing every mention of the city of “Caracas” within the diplomatic cables released by Wikileaks. (Click on the image for a larger version.) Overview labels each folder by the key words in the documents inside. The top folder here has words like PDVSA (the Venezuelan state oil company), “oil”, “billion,” “company” and “production,” so it’s mainly documents concerning the oil industry and other big business. Other top-level folders in this document set (not shown) concern embassy politics, elections, and military operations.

The top-level folder about oil splits into two sub-folders. The one on the left concerns the oil industry specifically, while the one on the right is more about banks and finance. The oil industry folder splits further into regional issues (the Petrocaribe consortium) and documents about PDVSA specifically. Each folder splits into smaller and smaller sub-folders, each of which contains a smaller number of documents on a more specific topic. To let you know when the documents in a folder are getting very specific, Overview tells you when “MOST” or “ALL” of the documents in that folder contain a particular word.

## How a computer understands topics

When I show this to reporters, their first question is always, how does the computer do that? It’s more than curiosity: If you’re going to rely on a computer to organize your documents, you’re asking a machine to help you decide what you should and shouldn’t read. The integrity of the reporting process demands that we understand what our algorithms are doing.

All document categorization algorithms are based on the ability to compare two documents to tell how similar they are. A group of documents which are all very similar to one another belong in the same folder. Computers don’t understand human language, so they need a simple mechanical process which takes two documents as input — literally just the sequence of words that make up the text of each document — and generates a number which is small if the documents are very different, and large if the documents concern the same topic.

Some text analysis systems, such as Open Calais, are based on “named entity recognition,” which extracts people, places, organizations, dates, etc. from the documents. Then, we can say that two documents are similar if they talk about the same entities. This is useful, but such systems will miss important generic words like “oil” and “production.” Instead, Overview examines every word of every document. In a sense, it reads the full text, so you don’t have to.

## Comparing two documents based on their full text

Suppose we have filed an FOIA request for a classified storybook for the children of CIA operatives, and after a long legal battle. The government has given us copies of these three secret documents:

* “The cat sat on the mat. Then the cat chased the rat.”

* “The cat slept all day on the mat.”

* “The rat ran across the floor.”

First, Overview strips capitalization, punctuation, and the grammar words such as “the,” “a,” “on,” etc. These words, also called stop words in natural language processing, aren’t useful for determining the topic of the text, because they appear in almost every document. This leaves us with:

* “cat sat mat cat chased rat”

* “cat slept all day mat”

* “rat ran across floor”

You can see that most of the sense of the document is still there, despite removing lots of words. Then, Overview counts how many times each word appears in each document, producing a word frequency table, like this:



This throws out the order of the words, which means the computer can’t understand the difference between “soldiers shot civilians” and “civilians shot soldiers.” This may seem very simplistic, but surprisingly, decades of information retrieval research show that word order usually doesn’t matter when all you want to know is the topic of a document.

Then Overview compares every pair of documents to check how similar they are. It does this by counting the number of words which appear in both documents, but with a twist: If a word appears twice in one document, it’s counted twice. In other words, we multiply the frequencies of corresponding words, then add up the results. This is the final similarity score.



In this case, the two documents about the cat have a similarity of 3: Cat appears twice in the first document and once in the second, plus rat appears once in each document. The document about the rat has no words in common with the document about the cat sleeping on the mat, so the similarity score is zero.

Documents which are similar enough end up in the same folder, and the folder is labelled by the words which make those documents different from all the others. In this case, the folder is labeled by “cat” and “mat” because those words don’t appear in the remaining document about the rat.



And that’s the heart of it. This description omits a number of details for simplicity, but includes all of the things a reporter needs to know:

* Overview uses the full text of each document.

* It is not sensitive to word order.

* Documents with overlapping words are placed in the same folder.

If you’d like to understand the process more deeply, here are a few more details: Overview actually processes text in two word bigrams, not just single words, so it can detect people’s names and other short phrases. Rather than just simple term counts, it weights each word by how rare it is in the document set overall, using a classic formula called TF-IDF. And to generate the folders, given the similarity between every pair of documents, Overview uses k-means clustering, splitting folders recursively at each level of the tree.

## Try it on your own documents

Overview can automatically import your projects from the popular DocumentCloud repository, which also handles document upload, OCR, and other tasks. Or, you can upload a CSV file if your text is already in spreadsheet or database format. It also works great on social media data, such as a collection of tweets or blog posts.

---

## File: docs/custom-development/api-and-plugins.md

---
title: Overview APIs and plugins
parent: Custom Development
grand_parent: Overview Help
nav_order: 7
---

# Overview APIs and plugins

For information about Overview APIs and plugins, please consult the
[API Overview](https://github.com/overview/overview-server/wiki/Overview-API-Overview)

---

## File: docs/custom-development/contact.md

---
title: Contact
parent: Custom Development
grand_parent: Overview Help
nav_order: 3
---

# Contact

Need help? Questions? Bugs? Interested in support or custom features for your business? We really want to hear from you.

Email us at __info@overviewdocs.com__

---

## File: docs/custom-development/importing-from-command-line.md

---
title: Importing from the command line
parent: Custom Development
grand_parent: Overview Help
nav_order: 2
---

# Importing from the command line

For information about importing from the command line, please consult the 
[Overview Upload Directory](https://github.com/overview/overview-upload-directory)

---

## File: docs/custom-development/index.md

---
title: Custom Development
has_children: true
nav_order: 7
---

# Custom development

If you have a specific need that you do not see addressed here, please don't hesitate to contact us. We can steer you in the right direction, and even develop custom solutions to fit your exact needs.

Email us at __info@overviewdocs.com__

---

## File: docs/export/export-to-excel.md

---
title: Exporting to Microsoft Excel
parent: Exporting
grand_parent: Overview Help
nav_order: 1
---

# Exporting to Microsoft Excel

Overview has long had a fairly important (if little-used) feature: it can export all documents into a spreadsheet. Day one, we wrote the spreadsheet in “comma-separated values” (“CSV”) format.

Then we realized that Microsoft Excel couldn’t open all CSV files.

Day two, we implemented a separate export file type, just for Microsoft Excel. Here are the differences.


## We truncate document text

One of the columns in our exported spreadsheet contains the entire text of each document. Microsoft Excel limits cell size to 32,767 characters. If Excel encounters a document with more than 32,767 characters of text, it stops importing. (We’ve found that most documents in Overview are far shorter than 32,767 characters. For a sense of scale: The Adventures of Huckleberry Finn is 610,000 characters; its average chapter is about 14,000 characters.)

When you choose Excel format, Overview truncates the text of very-long documents.

## We avoid Excel for Mac file-encoding issues

We spent ages debugging this issue, because we had to quell our disbelief. It turns out the “Encoding” option in Excel for Mac 2011’s CSV-import dialog doesn’t do anything. If you import an Overview CSV into Microsoft Excel for Mac 2011, Excel will garble those special characters. The same holds for virtually any CSV on the Internet that has special characters such as “smart quotes”. (Techno-lingo: Excel for Mac does not decode UTF-8, even though it presents the choice to decode UTF-8.)

We don’t know whether Microsoft solved this issue in Excel for Mac 2016.

Overview doesn’t do anything special to overcome this problem: it’s only a bug with the CSV-import feature. We recommend you avoid importing any CSVs into Microsoft Excel for Mac 2011 unless you’re certain they aren’t encoded in UTF-8. (UTF-8 is the most common encoding on the Internet.)

## The take-away

If you use Microsoft Excel, pick Excel format when you export from Overview. Overview will give you a file that’s as close to the original data as possible, and Excel will be able to open that file.

If you use a different spreadsheet program, pick CSV format for an _exact_ copy of the data within Overview.

---

## File: docs/import/adding-fields-during-import.md

---
title: Add fields during import
parent: Importing Files
grand_parent: Overview Help
nav_order: 6
---

# Adding fields during import

You can add custom fields to all documents at once while you’re importing. You can use this make some other notes about this batch of documents, such as tracking the source of each document in your set.

I’ll walk you through it.



First, add files as usual



Use the “Fields” interface to specify fields for these documents.



Now, every document you uploaded has the field values you wrote.



You can specify other field values whenever you add more documents to the document set.



The original documents’ fields will have the original values. The new documents’ fields will have the new values.



Export the document set, and you’ll see the field values for all documents.

---

## File: docs/import/import-from-csv.md

---
title: Importing documents from a CSV file
parent: Importing Files
grand_parent: Overview Help
nav_order: 3
---

# Importing documents from a CSV file

There are different ways to get your documents into Overview. This post is about loading documents into Overview using the file CSV file format, and the format that Overview expects.

## The quick answer
Overview expects all documents in a single CSV file, one document per row, plus a header row. Overview can read the following columns:

* text — this is the only required column, and must contain the document text.
* title — This is displayed when viewing the document. Documents are sorted by title in the document list.
* url — If the URL begins with https Overview will display the page when viewing the document. Otherwise Overview will display the plain text and a source link.
* id — ignored by Overview, but saved when the document set is exported, so you can match against other tables.
* tags — a comma-separated list of tags applied to each document. Great for comparing text to data.

Every other column will appear as editable document metadata.
The “text” column must exist. (It may also be named “snippet” or “contents” for compatibility with files exported by Radian 6 and Sysomos). All other columns are optional.

Need more details? Read on.

## Creating a CSV file
Many programs can save a CSV file.  For example, Excel can save a spreadsheet as a CSV file. Be sure to include the column names in the first row. You can also export a CSV file from a MySQL database.

Overview can probably read just about any CSV file created with any program, if you can ensure that the header is right. You may need to rename existing columns to the names that Overview expects, or you may need to add the header row entirely because some programs do not write a header. To do this, edit the CSV file with any text editor such as Notepad or TextEdit — but not Microsoft Word, as you will probably break the CSV file if you try to edit it in a word processor.

## What a CSV file for Overview should look like
A CSV file is simply a list of “comma-separated values,” organized into rows and columns, like a spreadsheet or a table. The file starts with a list of the column names, separated by commas. This is followed by each row of data, one row per line, with the values for each column again separated by commas. Overview only requires one column, which much be named “text.” Here is an example file:

```
text
This is the content of the first document.
And here is the text of document the second
Document three talks about quick brown foxes.
⋮
```

If the text of a document spans multiple lines, or itself contains commas, then it needs to be quoted. Quotes inside a quoted document must be “escaped” by turning them into double quotes. This is all standard CSV stuff, and any program or library that writes CSVs should do it automatically.

```text
"This document is really long and crosses multiple lines and contains
commas, which is why it is quoted."
"This is the second document. I'd like to say ""Hi!"" to everyone
to show how to put quotes inside a quoted document. The text of
this document can cross as many lines as needed, or even contain
blank lines like this:

The second document ends with this final quote."
The third document fits all on one line so no quotes needed.
"The fourth document has a comma in it, so it's quoted too."
⋮
```

Overview will display the text in the viewer pane when you click on each document. If you want to display something else for the document, you can add a “url” column which tells Overview to load a particular web page when you view that document. For security reasons, this must be an https URL. Here’s an example using tweets:

```text,url
New deploy today -- cleaner clustering, better handling of larger document sets. Anyone got a pile of PDFs they want to look at? Try it!,https://twitter.com/overviewproject/status/281075194557259777
"""“I’m not going to sit out on the newsroom floor and sort pages into stacks of documents"" ~@jackgillum on need for document mining software.",https://twitter.com/overviewproject/status/264450385928929280
⋮
```

There are three more columns that Overview can read. You can add a “title” to each document, which Overview displays in the document list. Documents are sorted by title, so this is a way to control the order that documents are listed.  You can add a unique ID column, simply named “id”, which Overview will read and associate with the document, and export with the document set. And you can add a comma separated list of “tags” if you want to import documents with tags already applied, or want to compare text to data.

The columns can be in any order; all that matters is that the order of the column names matches the order of the data.

Every other column will appear as editable document metadata. When Overview exports a document set, it writes out id, text, title, url, and tags fields, as well as any other fields you imported, or created within Overview.

## Uploading your CSV file to Overview

First, select the upload option from the document set list page:



Then choose a file. Overview will show a preview and do some basic checks to ensure that the format is OK. It should look like this:



After these checks you will see the usual import options, then a preview of the file contents. You may need tell Overview what character encoding the file uses. Try changing this if you see funny square characters in the preview, or accents aren’t displaying right. Then hit upload, and away we go.

---

## File: docs/import/index.md

---
title: Importing Files
has_children: true
nav_order: 2
---

# Getting your documents into Overview — the complete guide

The first and most common question from Overview users is _how do I get my documents in?_ The answer varies depending the format of your material. There are three basic paths to get documents into Overview: as multiple files, from a single CSV file, and via DocumentCloud. But there are several other tricks you might need, depending on your situation.



## 1. The simple case – a folder full of documents

Overview can directly read many file types, such as PDFs, Word, PowerPoint, RTF, text files, and so on. Choose “Upload document files” and add each document using the file selection dialog box.

If you are using the Chrome browser, you can also select entire folders at once. If you are not using Chrome, you can add all files in a folder in one step by clicking on the first file, then scrolling down and shift+clicking on the last file. Overview will  skip any files that are already uploaded, which makes it easy to sync up your document set with your local files.

Overview will automatically OCR files that are scanned images, though this takes much longer. You may want to split long documents into individual pages. See below for details.

## 2. Upload from the command line

If you have a large number of document files, or you wish to integrate Overview into an automatic pipeline, you can use the command line upload script to get files into Overview, or automatically synchronize a local directory with a document set.

## 3. Documents as data – a CSV file

Overview can read an entire document set as a single CSV file, with one row per document containing the document text and optional information such as URL, tags, and unique ID.  This simple format is documented here. A CSV file is a good choice if you need to bring data in from another application, such as a social media monitoring tool. You also use a CSV file to import tags, which can be used to compare text to data.

## 4. Journalist collaboration – DocumentCloud project import

DocumentCloud is collaborative document hosting service operated exclusively for professional journalists. It supports upload, OCR, search, annotation, publishing of documents, which may be public or private. Overview can import a DocumentCloud project directly, and DocumentCloud’s annotation tools are available directly within the Overview document viewer. This method is a good choice if you have access to DocumentCloud and the document set isn’t too large, up to a few thousand documents.

## 5. Everything is in one huge file — split the pages

Our users often receive their documents as a small number of huge files, thousands of pages each. This is especially common with FOIA requests, or when the source material is a stack of paper. In this case you will want Overview to analyze your material at the page level, not the file level. Overview can split pages automatically when importing files.

Learn more: [Splitting massive documents into pages](/docs/ingest/split-by-page)