knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Required Files

  1. svg/my_infographic.svg - scalable vector graphic file that defines the image shown in your scene
  2. svg_elements.csv - tells infographiq about the shapes to use from your svg(s)
  3. plot_indicators.csv - defines plots to show in the modal for each svg element

infographic.svg

Scalable Vector Graphic (SVG) files can be created using the free, cross-platform program Inkscape or exported from Adobe Illustrator. This file format is a human-readable subset of xml. For example files see the info-demo/svg.

svg files must be placed in a directory named svg in order to be found by infographiq.

svg_elements.csv

  1. Columns needed in svg_elements
  2. svg
  3. svg_id (lower case no spaces - MUST MATCH svg_id in plot_indicators.csv)
  4. label
  5. status_text
  6. status_color
  7. modal_before : optional row specifying a caption text file to include at the top of the modal
  8. modal_after : same as modal_before, but caption for the bottom of the modal

Example

|svg |svg_id |module_title |status_text|status_color| |----------|----------------|-----------------------|---------------|----------------| |corals.svg|sea-turtle | Sea Turtle (focal) | | |

plot_indicators.csv

  1. Columns needed in plot_indicators.csv
  2. svg_id (lower case no spaces - MUST MATCH svg_id in svg_elements.csv)
  3. plot_title (title on plot)
  4. y_label (y label on plot)
  5. col_t (calls column from csv_url)
  6. col_y (calls column from csv_url)
  7. filter (to filter from csv_url)
  8. group_by (to group from csv_url)
  9. csv_url (needs to be in github repository)
  10. skip_lines

Example:

| svg_id |plot_title |y_label |col_t|col_y|filter|group_by|csv_url| |------------|--------------------|------------------|---------|---------|----------|------------|-----------| |sea-turtle | Sea Turtle Richness| Species Richness | year | richness| NA | NA | github.com/marinebon/info-fk/blob/master/plot_indicators.csv



marinebon/infographiqR documentation built on Dec. 21, 2021, 2:44 p.m.