Skip to content
Drew Bollinger edited this page May 5, 2017 · 7 revisions

Welcome to the impact-model-redux wiki!

Create a chart by adding this to the markdown file:

```chart
mark: line
title: Chart Title
width: 33%
encoding:
  x:
    type: nominal
    field: year
  y:
    type: quantitative
    field: Val
fixed:
  commodity: bana
```

Options:

  • mark: type of chart. Can be one of line, bar, point
  • title: title of the chart. A string
  • width: width of the chart. Either a percentage (50%) or number of pixels (100px) representing the width of the chart. Percentages will work better for responsive/mobile styling.
  • encoding: Defines the axes for the chart. requires two properties x and y
    • x/y: requires two properties type and field
      • type: can be one of quantitative, nominal, categorical, or ordinal representing different types of scales.
      • field: one of the column headers from the uploaded data (e.g. commodity, region, year, or Val)
  • fixed: applies a filter to all the information brought down from the database to populate the chart. The property is the field name (e.g. commodity, region, year), the value is the desired value for the given field (e.g. bana, usa, 2030). The value can also be a comma-separated list of desired values (e.g. 2030, 2035, 2040)
  • dropdown: adds a dropdown for filtering the chart. Requires two properties field and values. This property can also be named anything beginning with the word dropdown(e.g.dropdownRegion`). This is useful when creating multiple dropdowns for one chart.
    • field: one of the column headers from the uploaded data (e.g. commodity, region, year)
    • values: a comma-separated list of desired values for dropdown options (e.g. 2030, 2035, 2040)
  • change: TBD

Create a map by adding this to the markdown file:

```map
title: Map Title
dropdown:
  field: impactparameter
  values: qdxagg, qnxagg, yldxagg, areaxagg, pwxagg, qsupxagg
change: percentage
fixed:
  commodity: bana
```
Clone this wiki locally