The interactive database of the Statistical Service (CYSTAT-DB) offers users the ability to create customized tables, format their presentation, edit and make calculations using the data, and save them in any of the available formats. Users can also save their queries and retrieve updated tables at a later stage with the latest available statistical data. Furthermore, the database allows the automation of data transfer through an interface (API).
Access to CYSTAT-DB is provided from the home page of CYSTAT Portal (related banner) and from the menu bar following Statistics > Related Links > CYSTAT-DB.
Below there are available brief guidelines for using CYSTAT-DB based on some frequently asked questions:
How can I find the data I am interested in on CYSTAT-DB?
How can I use or customize the table?
How can I save the table I am interested in?
How can I get the data in an automated way (API)?
How can I return to the variable options or select another table?
What is the explanation of the symbols?
Do you still have any questions?
How can I find the data I am interested in on CYSTAT-DB?
The interactive database includes data in tables, that are categorized in statistical themes and included in a relevant section under the theme. You can use the tree diagram with the statistical themes or search via "Search in CYSTAT-DB", both of which are available on the home page of the interactive database.
EN.PNG)
By clicking on a statistical theme in the tree diagram, you proceed to the next level, which includes subthemes and/or data tables. By clicking on a subtheme, related thematic sections and/or data tables are presented, and by clicking on a thematic section, the corresponding data tables are displayed.
EN.PNG)
By clicking on the title of a table, a new page opens where the options for the relevant data variables are provided.
EN.PNG)
The tree view displays tables that are updated regularly. Tables that stop being updated are archived in thematic sections with the description Archive.

How can I use or customize the table?
By clicking on the table title from the list of tables, the PX-Web tool will open a new page showing the selection fields for each variable (e.g. gender, month, economic activity, etc.). For each variable, you can choose one, several, or all of the categories that interest you. After you will have completed your selections, click the "Continue" icon, and the table with the relevant data will be displayed.
EN.PNG)
Useful tips:
- To select more than one option, use the Ctrl key and the left-click of your mouse.
- To select consecutive options, use the Shift key and the left-click of your mouse.
- To select all options at once, click the icon with the relevant label.
- To remove one of your options in a variable, use the Ctrl key and the left-click of your mouse on the option you want to remove.
- To remove all your options in a variable, click the icon with the relevant label.
- To view all the categories of the variable, click on the arrows or the scroll bar on the right.
- To find a category, you can also use the "Search" above the options. It is particularly useful in cases where a variable includes many categories. The search will show all values that contain the word or phrase you entered in the search field. A search can also be performed based on just the beginning of the word.
On the initial screen of each table, in addition to the variables, information About table is also presented (such as contact person, date of last update, units of measurement, etc.), as well as Footnotes, which usually relate to the data and refer to methodological information.
EN.PNG)
After completing the selections and clicking "Show table", a table will be generated on the screen based on the selections in the previous step. On the left of the table there are various options for customizing the data according to your needs.
EN.PNG)
By selecting "Show results as...", you have the option to display the data either in a table (with two layout options) or as a chart (the appropriate chart type is selected based on the data).
EN.PNG)
By selecting "Edit and Calculate", you can customize the table (change its layout, rotate it, adjust the number of decimal places, display codes and/or text for categories, etc.) as well as perform calculations (create sums, subtractions, divisions, multiplications, percentages). For quick access, layout options are also available above the table.
EN.PNG)
Additionally, by selecting the Hide empty rows option allows you to modify the display of rows with only zeros and/or dots.
EN.PNG)

How can I save the table I am interested in?
By selecting "Save result as...", you can save the table to your device in one of the available formats. For quick access, the option to save the table as an Excel file (xlsx) is also available above the table.
By selecting Save your query, you have also the option to save the table you created as a query in the form of a web link (url link). You can save this link in your browser (e.g. favorites, bookmarks) for your own use. This saving method has the advantage that each time you need the table, simply by clicking the saved link the table will be generated exactly as you created it, in the same format you saved it (e.g. Excel), and updated with the latest data (if available).
Saving your query can be done after you have completed your selections and any customizations, so that the table is generated on your screen just the way you prefer. Then, by clicking "Save your query", you can choose the setting for updating the table with newer data and in which format it should be saved. A link will be immediately generated, which you should save (see images below).
EN.PNG)
EN.PNG)

How can I get the data in an automated way (API)?
To enable automated use of the data (in a machine-readable format), a feature is available that allows you to connect the CYSTAT-DB with your own system or application using an Application Programming Interface (API).
After completing your selections and customizations in the table, click on "API query for this table" at the bottom of the page to proceed with the interconnection. You will receive on the screen information about the URL and the query that you need to send to retrieve the same data through the API. According to the instructions, you should "POST" the JSON request to the Url provided to you, so that you can access the table from your application.
EN.PNG)
To use a data table in an automated way, as part of interconnecting the CYSTAT-DB with your own system or application, you can also use the "Save your query" option. After choosing the setting for updating the table with newer data, you should select the output format as either a Json-stat or Json-stat2 file. A Url will then be provided, which you can use in your application (see images below).
EN.PNG)
EN.PNG)
EN.PNG)
For more information follow the link: https://www.scb.se/en/services/open-data-api/pxwebapi/api-for-the-statistical-database/.

How can I return to the variable options or select another table?
To return to the stage where the variables and category selection are displayed, as well as to return to the tree diagram with the tables, you can use the progress bar located at the top.
EN.PNG)

What is the explanation of the symbols?
Data tables may also include symbols in addition to numbers. An explanation is provided below.
SYMBOL
|
EXPLANATION
|
u
|
Data with low reliability
|
c
|
Confidential data
|
…
|
Data not available
|
N.A.
|
Not applicable
|
r
|
Revised data
|
p
|
Provisional / Preliminary data
|
b
|
Break in time series
|
e
|
Estimate
|

Do you still have any questions?
If you were unable to find the information you are looking for or if you encounter any difficulties generating the table you are interested in, please don’t hesitate to contact us.

Related files:
User Manual for CYSTAT-DB