The “Download by Variable” option allows you to search for keywords across all variables and their metadata available in the DEMSCORE database. This feature is especially useful for finding variables that match your specific research focus without needing to browse each dataset or codebook individually.

1. Select the “By Variable” Option in the Download Interface

To begin, select the “By Variable” option in the Download Interface.

2. Search for Keywords and Select Variables

When on the 'Generate Dataset by Individual Variables' page, search for keywords related to your chosen topic. In this example, we want to examine the relationship between democracy and trust in political parties, so we search for these terms and select relevant variables.

The table displays details about each variable, including the minimum and maximum years, dataset origin, the original level of analysis for the variable, and a codebook entry with more detailed information about what the variable measures.

After selecting all your variables, click the 'Generate Dataset' button located at either the top left corner or the bottom of the page.

3. Customize Your Dataset- Output Unit, File Format, Unit Columns, and Empty Rows

Output Unit

Choose an Output Unit based on the selected variables. The DEMSCORE Output Units determine the format in which you will retrieve your data. For example, 'COMPLAB Country-Year' means you will retrieve a dataset with one row per country and year, using COMPLAB country definitions and available year identifiers.

The system will suggest only the output units in which all selected variables are available.

For this example, we will choose 'COMPLAB Country-Year.'

File Format

Select a file format for your dataset. Available options include:

  • R (.rds)
  • STATA (.dta)
  • CSV (.csv)

Include Unit Columns

We recommend including Unit Columns to add unique identifiers for each row, which are useful when merging or comparing datasets later. If you choose not to include unit columns, be sure to select the appropriate identifier columns for your analysis.

Exclude Empty Rows

By default, all rows in the dataset are included, even those with missing data. However, you have the option to exclude empty rows, i.e. rows in which none of your selected  variables matches the chosen output unit. If you choose to exclude empty rows, any row that consists entirely of missing values- such as Demscores default placeholder -11111 or true missing values like NA - will be removed. This can help you create a more streamlined dataset, focusing only on rows with meaningful data, which is especially useful when dealing with sparse variables. 

However, keep in mind that excluding empty rows can affect your ability to easily merge or compare this dataset with others that use the same output unit. If the number of rows differ between datasets, you will need to rely on the unit identifiers (such as country or year) to perform a more complex merge later on.

Tips: Use this option when working with variables that have limited data points, but be cautious if you plan to merge with other datasets later.

4. Generate Dataset

Once you have finalized your selections, click the 'Generate Dataset' button. Your dataset will be processed and made available for download, along with a customized codebook containing details on the variables you selected.