Template:Traffic volume top/doc

From the AARoads Wiki: Read about the road before you go
Jump to navigation Jump to search

{{traffic volume top}}, {{traffic volume row}}, and {{traffic volume bottom}} are templates for creating tables of traffic volume data. Redirects {{tv-t}}, {{tv-r}}, and {{tv-b}} may be used instead.

Usage is as follows:

{{traffic volume top}}
{{traffic volume row}}
...
{{traffic volume row}}
{{traffic volume bottom}}

Usage of {{traffic volume top}}

{{traffic volume top|first column|second column|third column|fourth column|name=|align=|notes=}}

Basic parameters are:

  • Unnamed parameters 1, 2, 3, 4: data column headings, such as year or type of measurement. Only required if more than one data column is used.
  • name: the road name, if it is different to the article title. Otherwise, not required.
  • align: set to left to have the table left-aligned. The default if this parameter is nor included is right-aligned.
  • notes: set to yes to include a notes column at the right hand end of the table
Advanced settings

The following parameters provide further customisation:

  • location: Defines a custom label to use instead of "Location"
  • volume: Defines a custom label to use instead of "Volume"
  • caption: Defines a custom caption to use above the table
  • captionstyle: The CSS style of the <span> that contains the caption. The default is "font-size:85%".
  • divclass: The CSS class of the <div> that contains the table. The default is "thumb tright", or "thumb tleft" if |align=left is set.
  • tableclass: The CSS class of the table. The default is "wikitable infobox".
  • tablestyle: The CSS style of the table. The default is "margin:0px;".

Usage of {{traffic volume row}}

{{traffic volume row|location|data (column 1)|data (column 2)|data (column 3)|data (column 4)|note=}}

Basic parameters are:

  • Unnamed parameter 1: The location where data for this row was collected
  • Unnamed parameters 2, 3, 4, 5: the data (numbers). Use as many as need to match the number of columns defined in {{traffic volume top}}. If data is unavailable for one of the columns, use a dash or hard space (&nbsp;) instead.
  • note: A note regarding this location. Only use if |notes=yes is set in {{traffic volume top}}
Advanced settings

The following parameters provide further customisation:

  • align1 , align2, align3, align4: The default alignment of the data (number) cells is to the right. These may be set to left or center to change the alignment, e.g. to center align a dash in a cloumn wherr data isn't available.
  • align_note: Change the alignment of the note column. The default is left aligned, but this parameter may be set to right or center to change the alignment.

Usage of {{traffic volume bottom}}

{{traffic volume bottom|note=|volume=|source=}}

Basic parameters are:

  • note: A custom note that appears at the bottom of the table. Optional.
  • volume: The type of measurement, such as Annual average daily traffic. This parameter is optional, but usage is strongly recommended unless the column headings define the type of measurement.
  • source: The source(s) for the numbers. <ref> tags can be included here to provide a footnote. This a required parameter – all data should come from a reliable source, per Wikipedia:Verifiability.

Examples

Left aligned table, two columns of data

{{traffic volume top|align=left|name=Tonkin Highway|2007–08|2008–09}}
{{traffic volume row|North of Benara Road|39,760|–|align2=center}}
{{traffic volume row|South of Great Eastern Highway|56,220|57,160}}
{{traffic volume row|East of Abernethy Road|–|align1=center|55,960}}
{{traffic volume row|Bridge Over Canning River|–|align1=center|26,090}}
{{traffic volume row|North of Thomas Road|–|align1=center|9,570}}
{{traffic volume bottom|volume=Average vehicles per weekday|source=Main Roads Western Australia}}
Traffic volume on Tonkin Highway
Location Volume
2007–08 2008–09
North of Benara Road 39,760
South of Great Eastern Highway 56,220 57,160
East of Abernethy Road 55,960
Bridge Over Canning River 26,090
North of Thomas Road 9,570
  • Volume: Average vehicles per weekday
  • Source: Main Roads Western Australia

Text will wrap around the table, like this:

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Right aligned table, one column, no column header, custom note at bottom

{{tv-t|name=Kwinana Freeway}}
{{tv-r|Narrows Bridge|160,090|}}
{{tv-r|North of Leach Highway|103,400}}
{{tv-r|South of Roe Highway|85,200}}
{{tv-r|South of Rowley Road|61,840}}
{{tv-r|South of Mundijong Road|37,650}}
{{tv-b|note=Data is from 2007 – 2008|volume=Average vehicles per weekday|source=Main Roads Western Australia}}
Traffic volume on Kwinana Freeway
Location Volume
Narrows Bridge 160,090
North of Leach Highway 103,400
South of Roe Highway 85,200
South of Rowley Road 61,840
South of Mundijong Road 37,650
  • Data is from 2007 – 2008
  • Volume: Average vehicles per weekday
  • Source: Main Roads Western Australia

Text will also wrap around this table:

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Highly customised table

{{traffic volume top|align=left|caption=D21 traffic volume (2010)|[[AADT]]|[[AAST]]|location=Counting site|notes=yes|tableclass="wikitable"|captionstyle=""}}
{{traffic volume row|2702 Kaštel|1,952|2,989|note=Adjacent to the Kaštel border crossing}}
{{traffic volume row|2707 Sveti Ivan|1,980|2,510|note=Adjacent to the Ž5008 junction}}
{{traffic volume row|2719 Vižinada north|1,414|2,262|note=Between the D44 and the Ž5041 junctions}}
{{traffic volume row|2721 Baderna north|1,925|2,478|note=Adjacent to the D48 junction}}
{{traffic volume row|2717 Bale|2,366|3,148|note=Between the Ž5098 and the Ž5096 junctions}}
{{traffic volume row|3905 Pula north|10,696|13,527|note=Between the Ž5115 and the Ž5117 junction}}
{{traffic volume bottom|source=Hrvatske ceste}}{{-}}
D21 traffic volume (2010)
Counting site Volume Notes
AADT AAST
2702 Kaštel 1,952 2,989 Adjacent to the Kaštel border crossing
2707 Sveti Ivan 1,980 2,510 Adjacent to the Ž5008 junction
2719 Vižinada north 1,414 2,262 Between the D44 and the Ž5041 junctions
2721 Baderna north 1,925 2,478 Adjacent to the D48 junction
2717 Bale 2,366 3,148 Between the Ž5098 and the Ž5096 junctions
3905 Pula north 10,696 13,527 Between the Ž5115 and the Ž5117 junction
  • Source: Hrvatske ceste

Text will not wrap around this table because {{-}} was included at the end


TemplateData for {{Traffic volume top}}

TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Traffic volume top in articles based on its TemplateData.

TemplateData for Traffic volume top

<templatedata> {

 "description": "Creates the table headings for a traffic volume table. Use with the 'Traffic volume row' template (for each row of data) and 'Traffic volume bottom' template (to close the table)",
 "params": {
   "divclass": {
"label": "
CSS class", "description": "Normally not used (the CSS class of the
element that contains the table)",
     "type": "string",
     "required": false
   },
   "align": {
     "label": "Table alignment",
     "description": "The alignment as the table, valid values are 'left' or 'right'. If not included, will default to 'right'",
     "type": "string",
     "required": false
   },
   "tableclass": {
     "label": "Table CSS class",
     "description": "Normally not used (the CSS class of the table)",
     "type": "string",
     "required": false
   },
   "tablestyle": {
     "label": "Table CSS style",
     "description": "Normally not used (the CSS style of the table)",
     "type": "string",
     "required": false
   },
   "captionstyle": {
     "label": "Caption CSS style",
     "description": "Normally not used (the CSS style of the table's caption)",
     "type": "string",
     "required": false
   },
   "caption": {
     "label": "Caption",
     "description": "Normally not used (a custom caption for the table, instead of the default)",
     "type": "string",
     "required": false
   },
   "name": {
     "label": "Road name",
     "description": "The road name. Only needs to be entered if it is different to the article title.",
     "type": "string",
     "required": false
   },
   "1": {
     "label": "1st column heading",
     "description": "Description of numbers in first data column, such as year or measurement type. Optional if there is only one data column",
     "type": "string",
     "required": false
   },
   "location": {
     "label": "Location column heading",
     "description": "Normally not used (a custom heading for the location column, instead of the default 'Location')",
     "type": "string",
     "required": false
   },
   "4": {
     "label": "4th column heading",
     "description": "Description of numbers in fourth data column, such as year or measurement type. Only required if there are four data columns.",
     "type": "string",
     "required": false
   },
   "3": {
     "label": "3rd column heading",
     "description": "Description of numbers in third data column, such as year or measurement type. Only required if there are three or more data columns.",
     "type": "string",
     "required": false
   },
   "2": {
     "label": "2nd column heading",
     "description": "Description of numbers in second data column, such as year or measurement type. Only required if there are two or more data columns.",
     "type": "string",
     "required": false
   },
   "volume": {
     "label": "Volume label",
     "description": "Normally not used (a custom label that spans the data columns, instead of the default 'Volume')",
     "type": "string",
     "required": false
   },
   "notes": {
     "label": "Notes column",
     "description": "Set to 'yes' to activate a notes column on the right hand side of the table",
     "type": "string",
     "required": false
   }
 }

} </templatedata>