Socrata 101: Creating a Data Lens


Socrata enables users to create visualizations quickly and easily. Socrata is web-based and allows users access to data in which they can display in a variety of ways. Socrata, for the most part, has a very simple user-interface. Visualizations are not complex to create, but can be limited as to how the information is displayed.  Data lens expand the ability for Socrata to summarize and display data. This story will provide a quick and simple walk-through to illustrate how to create a data lens using Socrata.

Before you Begin

Creating a data lens allows users to share information with others. It is important to understand what information is to be shared and how it is to be shared. There are many different visualizations to choose from that can be placed into a data lens and while most can be used to display information, some are better than others depending upon the data. Keep your user in mind when creating the data lens.
Some things to keep in mind:
  • Who are your intended users?
  • What information do you want to share?
  • What is the best visualization to use to get your message across?
  • Does the visualization add value to your data?
  • What is your overall message?

Choosing a Dataset

If the dataset is one that is owned by the user, it will appear in the user's data assets. If not the catalog can be searched for the correct data. For the purpose of this story, a dataset from the Data Catalog will be used.

Searching for a Dataset

A user can either use the Search bar using key words to find a dataset, or a user can limit the assets in the Data Catalog by choosing a Category or Type.

Dataset Located

The dataset for this example is the "crash" data. It was found by searching for the keyword "crash" and limiting the results to only "datasets". The dataset is titled "SD_Crash Data". It is currently being used for the Strategic Direction Story.

Dataset Examination

Once your dataset is identified and chosen from the catalog or the user's assets, a data lens can be created. To accomplish this "Visualize" must be chosen.

Data Lens Creation

The "Visualize" option contains the Data Lens options. Once the Data Lens is chosen, the user will start the process of creating a data lens.

New Data Lens

The "New Data Lens" option should be chosen to create a data lens. The one issue that may arise depends on if the user just added data to Socrata. Sometimes, when new data is added to Socrata, it takes a few minutes for the data to become "active". It is usually not long, but the "New Data Lens" option may be grayed out until the data is "active". This only occurs with a new dataset, existing datasets do not have this issue.

Creating the Data Lens and Removing Cards

Once "New Data Lens" is chosen, Socrata begins the automatic process of building the data lens. It is usually a quick process, but the data lens created usually needs to be changed, or modified, to fit the needs of the users. Typically, Socrata will add cards to the data lens that may not make sense to the user and have to be removed. To accomplish removing a card, a tiny "x" is in the corner of each one. A user can also simply click and drag the cards from one position to another.

Creating the Data Lens and Adding Cards

Once the initial data lens is created, new cards can be added. Each section has a specific amount of cards that can be displayed in each row, either 2, 3, or 4. The cards can be moved around by "dragging and clicking". 

Card Options in Data Lens

The options for adding a data lens card are pretty basic, and there is little that can be done to modify them visually. Users can choose which column of data to use, the values that should be displayed, and the card type. When finished creating the card choose "Add card" to continue.

Completing and Saving the Data Lens

Once the data lens is complete and organized the way the user would like it to display. The data lens must then be saved. The "save" function is at the bottom left of the document.

Saving the Data Lens

When saving the data lens ensure that the title and description are both filled out with enough detail that other users can find and use the information. Also, there is an option so that the data lens is hidden in the catalog. This would hide the data from the catalog view, although it is still attached to the dataset and appears in the user's assets. Once it is saved, the data lens process is complete.