Twitter timeline

Twitter activity visualised over a schedule, ideal for conferences

Updated 2 years ago by Template retirement home

How to use this template

A Flourish template for visualising the Twitter activity at a conference or other event. Created by @theduncanclark, @robinhouston and @daanlouter at (and initially for) #OpenVisConf. Unlike other Flourish templates, use of this template requires us to run the associated server on a hashtag. Contact hello@flourish.studio for more information.

This section documents API usage specific to this template, so for an introduction we suggest you refer to the generic API documentation instead.

template: _102

version: _23

Template data

There are two different formats in which you can supply data to this template. Which one will be more convenient for you likely depends on the source of your data, as described below.

Array of objects with arbitrary keys, and a bindings object

This format is most likely useful when you have data from an external source, such as CSV data loaded from d3-dsv. You should supply this attached to the opts.data, which might look like:

    {
        schedule: [
            { "ScheduleHeader1": ..., "ScheduleHeader2": ..., ... },
            { "ScheduleHeader1": ..., "ScheduleHeader2": ..., ... },
            { "ScheduleHeader1": ..., "ScheduleHeader2": ..., ... },
            ...
        ]
    }

... but with the keys being the column headers from your source data instead. To tell the API how these values from each column should be associated with the keys that the template is expecting, you must also supply an object attached to opts.bindings. (The meanings of the keys in the bindings object are documented below.) The minimal bindings you can supply for this template are as shown in this example:

{
    template: "_102",
    version: "_23",
    bindings: {
        schedule: {
            day: "ScheduleHeader1",
            session_start: "ScheduleHeader2",
            session_end: "ScheduleHeader3",
            session_name: "ScheduleHeader4",
            speaker_name: "ScheduleHeader5",
            speaker_handle: "ScheduleHeader6"
        }
    },
    data: {
        schedule: [
            { "ScheduleHeader1": ..., "ScheduleHeader2": ..., ... },
            { "ScheduleHeader1": ..., "ScheduleHeader2": ..., ... },
            { "ScheduleHeader1": ..., "ScheduleHeader2": ..., ... },
            ...
        ]
    }
}

All possible bindings that you can supply are shown in this example:

{
    template: "_102",
    version: "_23",
    bindings: {
        schedule: {
            day: "ScheduleHeader1",
            session_start: "ScheduleHeader2",
            session_end: "ScheduleHeader3",
            session_name: "ScheduleHeader4",
            speaker_name: "ScheduleHeader5",
            speaker_handle: "ScheduleHeader6"
        }
    },
    data: {
        schedule: [
            { "ScheduleHeader1": ..., "ScheduleHeader2": ..., ... },
            { "ScheduleHeader1": ..., "ScheduleHeader2": ..., ... },
            { "ScheduleHeader1": ..., "ScheduleHeader2": ..., ... },
            ...
        ]
    }
}

(As before, the keys containing "Header" would be replaced by column names from your data source.)

Array of objects with template-defined keys

There is an alternative format you can use, which is likely to be easier to use if your data is not from a spreadsheet source. With this alternative format you supply your data to the template as an array of objects, attached to opts.data, where the keys must be those used by the template, as documented below. In this case there is no need to supply a bindings object, since the key names are already those expected by the template. The required properties in the data object are as follows (scroll down for a description of what each property is):

{
template: "_102",
version: "_23",
data: {
    schedule: [
        {
            day: ...,
            session_start: ...,
            session_end: ...,
            session_name: ...,
            speaker_name: ...,
            speaker_handle: ...
        },
        ...
    ]
},
...
}

And the full list of all possible properties is as follows:

{
template: "_102",
version: "_23",
data: {
    schedule: [
        {
            day: ...,
            session_start: ...,
            session_end: ...,
            session_name: ...,
            speaker_name: ...,
            speaker_handle: ...
        },
        ...
    ]
},
...
}

Meanings of the template data keys:

  • schedule.day: day
  • schedule.session_start: session_start
  • schedule.session_end: session_end
  • schedule.session_name: session_name
  • schedule.speaker_name: speaker_name
  • schedule.speaker_handle: speaker_handle

Template settings

Options for opts.state.

Settings

socket_url string

Socket URL. This template requires our Twitter socket server to be running for a hashtag. Contact hello@flourish.studio for more information!. A web socket server that returns tweets for the appropriate hashtag. Contact support@flourish.studio if you're interested in having us set up a server for your event.

title string

Title.

subtitle string

Subtitle.

logo_url string

Logo image url. Appears top right; must be an https:// url or blank

logo_width number

Logo image width (pixels).

scale_factor number

Tweet size.