Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Blog
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
Yandex DataLens
  • Getting started
  • Practical guidelines
    • All tutorials
    • Visualizing data from a CSV file
    • Creating and publishing a chart with a map of Moscow from a CSV file
    • Analyzing a retail chain's sales from a ClickHouse database
    • Analyzing public data on road accidents in Russia
    • Analyzing sales and locations of pizzerias based on data from ClickHouse DB and Marketplace
    • Web analytics with a connection to Yandex Metrica
    • Web analytics with funnels and cohorts calculated based on Yandex Metrica data
    • Mobile app analytics based on AppMetrica data
    • Analyzing Yandex Music podcast statistics (for podcasters)
    • Visualizing data with a QL chart
    • Visualizing data using parameters
    • Visualizing Yandex Monitoring data
    • Building customer journey charts based on AppMetrica data
  • Concepts
    • Service overview
    • Organizations in DataLens
    • Connection
    • Data types
    • Datasets
      • Overview
      • Data model
      • Dataset settings
    • Charts
      • Overview
      • Chart settings
      • Measure Values and Measure Names
    • Dashboards
    • Joining data
    • Using Markdown in DataLens
    • DataLens Public
    • Calculated fields
      • Overview
      • Formula syntax
    • Parameterization
    • Marketplace
    • Backups
    • Caching
    • Quotas and limits
  • Step-by-step instructions
    • All instructions
    • Working with connections
      • Creating a ClickHouse connection
      • Creating a connection to a file
      • Creating a Google Sheets connection
      • Creating a MySQL connection
      • Creating a PostgreSQL connection
      • Creating a SQL Server connection
      • Creating a BigQuery connection
      • Creating an Oracle Database connection
      • Creating a YDB connection
      • Creating a Greenplum® connection
      • Creating a Prometheus connection
      • Creating a Yandex Monitoring connection
      • Creating a Yandex Metrica API connection
      • Creating an AppMetrica connection
      • Creating a Yandex Cloud Billing connection
      • Managing connection access
    • Working with datasets
      • Creating a dataset
      • Combining data from multiple tables
      • Creating a data field
      • Creating a calculated data field
      • Creating a default filter for new charts
      • Updating fields in datasets
      • Describing a dataset via a source SQL query
      • Managing dataset access
      • Managing access to data rows
      • Adding parameters to a dataset
    • Working with charts
      • Creating a chart
      • Creating a QL chart
      • Creating a multi-dataset chart
      • Adding a hierarchy
      • Configuring the navigator
      • Publishing a chart
      • Managing chart access
      • Adding ID as a parameter
      • Adding parameters to a chart
      • Configuring the display of null values
    • Working with dashboards
      • Creating dashboards
      • Adding charts to dashboards
      • Adding selectors to dashboards
      • Creating an alias
      • Deleting an alias field
      • Publishing dashboards
      • Managing dashboard access
      • Adding parameters to a dashboard
      • Dashboard auto-update
      • Widget display order on a mobile device
    • Working with permissions
      • Granting permissions
      • Deleting permissions
      • Request permissions
    • Working with DataLens Marketplace
      • Adding a product from Marketplace
      • Removing a product from Marketplace
      • Creating and connecting a connector (for partners)
    • Working with organizations
      • Switching between DataLens instances
  • Access management
    • Managing access to DataLens
    • Managing access at the data row level
  • Pricing policy
  • Visualization reference
    • All visualizations
    • Line chart
    • Stacked area chart
    • Normalized stacked area chart
    • Column chart
    • Normalized column chart
    • Bar chart
    • Normalized bar chart
    • Scatter chart
    • Pie chart
    • Indicator
    • Tree chart
    • Donut chart
    • Table
    • Pivot table
    • Map
      • Overview
      • Point map
      • Point map with clusters
      • Polyline map
      • Choropleth map
      • Heat map
    • Combined chart
  • Function reference
    • All Functions
    • Aggregate functions
      • Overview
      • ALL_CONCAT
      • ANY
      • ARG_MAX
      • ARG_MIN
      • AVG
      • AVG_IF
      • COUNT
      • COUNTD
      • COUNTD_APPROX
      • COUNTD_IF
      • COUNT_IF
      • MAX
      • MEDIAN
      • MIN
      • QUANTILE
      • QUANTILE_APPROX
      • STDEV
      • STDEVP
      • SUM
      • SUM_IF
      • TOP_CONCAT
      • VAR
      • VARP
    • Array functions
      • Overview
      • ARRAY
      • ARR_AVG
      • ARR_MAX
      • ARR_MIN
      • ARR_PRODUCT
      • ARR_REMOVE
      • ARR_STR
      • ARR_SUM
      • CAST_ARR_FLOAT
      • CAST_ARR_INT
      • CAST_ARR_STR
      • CONTAINS
      • COUNT_ITEM
      • GET_ITEM
      • REPLACE
      • SLICE
      • STARTSWITH
      • UNNEST
    • Date/Time functions
      • Overview
      • DATEADD
      • DATEPART
      • DATETRUNC
      • DAY
      • DAYOFWEEK
      • HOUR
      • MINUTE
      • MONTH
      • NOW
      • QUARTER
      • SECOND
      • TODAY
      • WEEK
      • YEAR
    • Logical functions
      • Overview
      • CASE
      • IF
      • IFNULL
      • ISNULL
      • ZN
    • Mathematical functions
      • Overview
      • ABS
      • ACOS
      • ASIN
      • ATAN
      • ATAN2
      • CEILING
      • COMPARE
      • COS
      • COT
      • DEGREES
      • DIV
      • EXP
      • FLOOR
      • GREATEST
      • LEAST
      • LN
      • LOG
      • LOG10
      • PI
      • POWER
      • RADIANS
      • ROUND
      • SIGN
      • SIN
      • SQRT
      • SQUARE
      • TAN
    • Operators
      • Overview
      • AND
      • Addition and concatenation (+)
      • BETWEEN
      • Comparison
      • Division (/)
      • IN
      • IS FALSE
      • IS TRUE
      • LIKE
      • Modulo (%)
      • Multiplication (*)
      • NOT
      • Negation (-)
      • OR
      • Power (^)
      • Subtraction (-)
    • String functions
      • Overview
      • ASCII
      • CHAR
      • CONCAT
      • CONTAINS
      • ENDSWITH
      • FIND
      • ICONTAINS
      • IENDSWITH
      • ISTARTSWITH
      • LEFT
      • LEN
      • LOWER
      • LTRIM
      • REGEXP_EXTRACT
      • REGEXP_EXTRACT_NTH
      • REGEXP_MATCH
      • REGEXP_REPLACE
      • REPLACE
      • RIGHT
      • RTRIM
      • SPACE
      • SPLIT
      • STARTSWITH
      • SUBSTR
      • TRIM
      • UPPER
      • UTF8
    • Text markup functions
      • Overview
      • BOLD
      • ITALIC
      • MARKUP
      • URL
    • Time series functions
      • Overview
      • AGO
      • AT_DATE
    • Type conversion functions
      • Overview
      • BOOL
      • DATE
      • DATETIME
      • DATETIME_PARSE
      • DATE_PARSE
      • DB_CAST
      • FLOAT
      • GEOPOINT
      • GEOPOLYGON
      • INT
      • STR
    • Window functions
      • Overview
      • AVG
      • AVG_IF
      • COUNT
      • COUNT_IF
      • FIRST
      • LAG
      • LAST
      • MAVG
      • MAX
      • MCOUNT
      • MIN
      • MMAX
      • MMIN
      • MSUM
      • RANK
      • RANK_DENSE
      • RANK_PERCENTILE
      • RANK_UNIQUE
      • RAVG
      • RCOUNT
      • RMAX
      • RMIN
      • RSUM
      • SUM
      • SUM_IF
    • Function Availability
  • Function tutorials
    • Aggregate functions
    • Window functions
    • LOD expressions and filtering in aggregate functions
  • Public materials
    • Educational projects
    • Webinars and conferences
    • Articles and publications
    • Public dashboards and charts
  • Troubleshooting
    • Questions and answers
    • DataLens errors
  1. Practical guidelines
  2. Visualizing data from a CSV file

Visualizing data from a CSV file

Written by
Yandex Cloud
  • Before you start
  • Step 1. Create a connection and a dataset
  • Step 2. Create a dataset
  • Step 3. Create the first chart
  • Step 4. Create the second chart
  • Step 5. Create a dashboard
  • Step 6. Add charts to the dashboard
  • Step 7. Add selectors to the dashboard
  • Step 8. Set up widgets and start analyzing dependencies
  • Step 9. Continue to analyze the data about superheroes

For our source data, let's use a file named SuperHeroes.csv, which has information about superheroes, like their name, gender, race, and comic book publisher.

In this scenario, you can use DataLens to analyze dependencies, for example:

  • A superhero's weight from their gender.
  • A superhero's weight from whether they're good or bad.

To visualize and explore your data, set up DataLens follow these steps:

  1. Before you start.
  2. Create a connection.
  3. Create a dataset.
  4. Create your first chart.
  5. Create your second chart.
  6. Create a dashboard.
  7. Add charts to the dashboard.
  8. Add selectors to the dashboard.
  9. Set up widgets and start analyzing dependencies.
  10. Continue to analyze the data about superheroes.

Before you start

To get started with DataLens:

New user
I'm already using Yandex Cloud
  1. Log in to your Yandex account. If you don't have an account, create one.
  2. Open the DataLens homepage.
  3. Click Open Datalens.
  4. Click Log in.
  1. Log in to your Yandex account.

  2. Open the DataLens homepage.

  3. Click Open Datalens.

  4. Select one of the options:

    • If you already have an organization, select it from the drop-down menu in the Organizations tab and click Open DataLens.

      Note

      To activate a DataLens instance, the user must have the admin or owner role. For more information about roles, see Granting permissions in Organization.

    • If you have a cloud but no organization, click Add new DataLens. In the window that opens, enter your organization's name and description and click Create organization and DataLens. For more information about working with organizations, see Getting started with organizations.

If you have a technical question about the service, please contact Yandex Cloud support. To ask for advice, discuss the solution to your problem or best practices of the service, write to the DataLens chat in Telegram.

Step 1. Create a connection and a dataset

Create a dataset based on the connection to the CSV file.

  1. Go to the interfaceDataLens.

  2. Click Create connection.

    image

  3. Choose CSV.

    image

  4. Click Select CSV file.

    image

  5. Select a file. For this example, use SuperHeroes.csv (download link).

    Wait until the table content appears on the screen.

  6. Click Create.

    image

  7. After the data is saved, click Create dataset.

    image

Step 2. Create a dataset

  1. Drag the SuperHeroes.csv table from the selection panel to the workspace.

    image

  2. Go to the Fields tab.

    image

  3. Create a field for the superheros' average weight:

    1. Click in the Weight row.

    2. Choose Duplicate.

      image

    3. Rename the Weight (1) duplicate field to Weight avg: click the row name, delete the current name, and enter the new one.

    4. In the Aggregation column, select Average for the Weight avg field.

      image

  4. Click Save in the upper-right corner to save the dataset.

    image

  5. Enter a name for the dataset: SuperHeroes dataset, then click Create.

  6. When the dataset is saved, click Create chart.

    image

Step 3. Create the first chart

To visualize data by gender, create a chart: column chart.

  1. Add the names of superheroes to the chart. To do this, drag the Name field from the Dimensions section to the X section.

  2. Add the superheros' weight to the chart. To do this, drag the Weight avg field from the Measures section to the Y section.

    image

  3. Sort the chart by weight (for example, in descending order).

    1. From the first column in the Measures section, drag the Weight avg field to the Sorting section.

      image

  4. Leave only the superheroes whose weight is known on the chart (greater than zero).

    1. From the first column in the Measures section, drag the Weight avg field to the Filters section.

    2. In the window that opens, specify the operation Greater than and the value 0.

    3. Click Apply.

      image

  5. Add a color division for superheroes depending on their gender to the chart. To do this, drag the Gender field from the Dimensions section to the Colors section.

    image

  6. Redefine the colors for the Gender dimension.

    1. Click the settings icon in the Colors section.

      image

    2. Select the colors: Female: pink, Male: blue, unknown: orange.

      image

  7. Save the chart.

    1. Click Save in the upper-right corner to save the chart.

      image

    2. In the window that opens, enter a name for the chart: SuperHeroes — gender, then click Save.

Step 4. Create the second chart

To visualize whether a superhero is good or bad, create a bar chart.

  1. Copy the chart from the previous step.

    1. Click the down arrow next to the Save button in the upper-right corner.

    2. Click Save as.

      image

    3. In the window that opens, enter the name of the new chart: SuperHeroes — alignment.

    4. Click Save.

  2. Add to the chart a color division for superheroes depending on whether they are good or bad. To do this, drag the Alignment field from the Dimensions section to the Colors section.

    The previous value of the section (the Gender field) is replaced with Alignment.

    image

  3. Redefine the colors for the Alignment dimension.

    1. Click the settings icon in the Colors section.

    2. Select the colors: good: green, neutral: blue, bad: red, unknown: orange.

      image

  4. Click Save in the upper-right corner to save the chart.

Step 5. Create a dashboard

Create a Dashboard to add your charts to.

  1. Go to the DataLens homepage. To do this, click the words Yandex DataLens in the upper-left corner.

  2. Click Create dashboard.

    image

  3. Enter the name SuperHeroes dashboard for the dashboard and click Create.

Step 6. Add charts to the dashboard

  1. The first time you open the dashboard after saving, it opens in edit mode. If you open it later, click Edit in the upper-right corner.

    image

  2. Click Add.

  3. Choose Chart.

    image

  4. In the window that opens, click Select and choose the SuperHeroes — gender chart.

    This automatically fills in the Title field with the name of the selected chart.

  5. Click Add.

    image

  6. Add another chart. Perform all the steps from the beginning and specify the SuperHeroes — alignment chart in step 5.

    image

Step 7. Add selectors to the dashboard

Add selectors to filter superheroes by race (the Race field) and publisher (the Publisher field).

  1. Click Add.

  2. Choose Selector.

    image

  3. Select the SuperHeroes dataset.

  4. Select the Race field.

    This automatically fills in Title with the name of the selected field.

  5. Click the Show checkbox next to the selector title.

  6. Enable the Multiple choice option.

  7. Click Add.

    image

  8. Add another selector. Perform all the steps from the beginning and specify the Publisher field in step 6.

    image

Step 8. Set up widgets and start analyzing dependencies

  1. Drag the selectors to the top of the page next to each other.

  2. Stretch the charts across the width of the dashboard.

  3. Click Save in the upper-right corner to save the dashboard.

    image

  4. Apply various filters and analyze the weight dependencies on a superhero's gender and good or bad alignment.

    image

    The dataset analyzed shows the following dependencies:

    • Men are generally heavier than women.
    • Bad superheroes are mostly heavier than good ones.

Step 9. Continue to analyze the data about superheroes

You can create new indicators in the dataset, such as average height (average from the Height field) and the number of superheroes (the number of unique from the Name field) and answer the following questions:

  • Representatives of which race are the most numerous?
  • Does a superhero's height depend on whether they are good or bad?
  • Which studio created the most superheroes?

Was the article helpful?

Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
In this article:
  • Before you start
  • Step 1. Create a connection and a dataset
  • Step 2. Create a dataset
  • Step 3. Create the first chart
  • Step 4. Create the second chart
  • Step 5. Create a dashboard
  • Step 6. Add charts to the dashboard
  • Step 7. Add selectors to the dashboard
  • Step 8. Set up widgets and start analyzing dependencies
  • Step 9. Continue to analyze the data about superheroes