Help:MIT Simile Timeline Mashup
From We The People
Contents |
MIT Simile Timeline Mashup
- See Help:Inline_Queries for information on Inline Queries.
- See http://simile.mit.edu/
- See http://semantic-mediawiki.org/wiki/Help:Timeline_format
Basic Overview
For the Timeline, we use the same Inline Queries that we have been using before, except with the additional parameter "| format = timeline". Also, as a reference, you can view the list of automatically generated properties or Special:Properties.
Usage and parameters
From http://semantic-mediawiki.org/wiki/Help:Timeline_format [1]
The timeline formats use printout statements in queries for properties of Type:Date. If the timeline remains empty even though there are results, this is usually because no printouts for dates were specified. Timeline will normally use the first and optionally second date and display every result as a single point (one date given) or interval (two dates given). All other printout statements are shown in the tooltips that appear when clicking on items.
Eventline is similar, but displays all dates in the printout as separate points. So a query with five data printouts would create five points on the timeline for each result. Different colors are used to maintain some visual hint of which points belong to which result. Again the tooltip shows all details.
The timeline and eventline formats introduce the following additional parameters:
- timelinebands: defines which bands are displayed in the result. Available bands are DECADE, YEAR, MONTH, WEEK, and DAY. Bands should be given from finer to coarser, and be separated by commas as in the above example.
- timelineposition: defines where the timeline initially focusses at. Possible values are start (earliest entry), middle (middle entry), end (latest entry).
- timelinestart: can be used to define a specific printout (property) name to use as a first timepoint in timeline.
- timelineend: can be used to define a specific printout (property) name to use as a second timepoint in timeline.
- timelinesize: can be used to give the height of the timeline. The default value is 300px.
Timeline of last 10 Theft's in Single Member District 5C01
{{#ask: [[Occurred on::+]] [[offense::Theft]] [[Single member district::5C01]]
| ?occurred on
| ?offense
| ?ward
| ?narrative
| ?occurred on block
| order=descending
| format=timeline
| timelinebands=DAY,MONTH,YEAR
| timelineposition=end
| limit=10
}}
Offense Theft
Ward 5
Narrative NO NARRATIVE IS AVAILABLE.
Occurred on block 200 B/O R ST NW
Crime Report:8109892010-03-02T00:00:000Occurred on 2 March 2010
Offense Theft
Ward 5
Narrative NO NARRATIVE IS AVAILABLE.
Occurred on block 300 B/O FLORIDA AVE NW
Crime Report:8087402010-02-24T00:00:000Occurred on 24 February 2010
Offense Theft
Ward 5
Narrative NO NARRATIVE IS AVAILABLE.
Occurred on block UNIT B/O P ST NW
Crime Report:8038502010-02-09T00:00:000Occurred on 9 February 2010
Offense Theft
Ward 5
Narrative NO NARRATIVE IS AVAILABLE.
Occurred on block 1500 B/O 4TH ST NW
Crime Report:7711432009-11-13T00:00:000Occurred on 13 November 2009
Offense Theft
Ward 5
Narrative NO NARRATIVE IS AVAILABLE.
Occurred on block 300 B/O R ST NW
Crime Report:7626402009-10-28T00:00:000Occurred on 28 October 2009
Offense Theft
Ward 5
Narrative NO NARRATIVE IS AVAILABLE.
Occurred on block UNIT B/O P ST NW
Crime Report:7484612009-09-28T00:00:000Occurred on 28 September 2009
Offense Theft
Ward 5
Narrative NO NARRATIVE IS AVAILABLE.
Occurred on block 1700 B/O 4TH ST NW
Crime Report:7412812009-09-13T00:00:000Occurred on 13 September 2009
Offense Theft
Ward 5
Narrative NO NARRATIVE IS AVAILABLE.
Occurred on block 1600 B/O 1ST ST NW
Crime Report:7379972009-09-06T00:00:000Occurred on 6 September 2009
Offense Theft
Ward 5
Narrative NO NARRATIVE IS AVAILABLE.
Occurred on block 1500 B/O 1ST ST NW
Crime Report:7319872009-08-26T00:00:000Occurred on 26 August 2009
Offense Theft
Ward 5
Narrative NO NARRATIVE IS AVAILABLE.
Occurred on block 1700 B/O 4TH ST NW
2010-03-03T00:00:00
The line
{{#ask: [[Occurred on::+]] [[offense::Theft]] [[Single member district::5C01]]
is telling the search to return every page that has a value for the property "Occurred on", every page that has the property Offense equal to "Theft", and finally every page with the property Single member district "5C01".
| ?occurred on
Because "Occurred on" is a Date, the timeline will use this to place the pages on the timeline. It is told to do this by this line, where we print out the property "occurred on". If we wanted to have another date property appear on the timeline, we could then print another date. See the next example for this usage, as it is useful in seeing how long Service Requests take to be resolved.
| ?offense | ?ward | ?narrative | ?occurred on block
These just tell the timeline what we want to appear in the bubble when we click on a result.
| sort=occurred on | order=descending
These tell the results to sort based on the property "occurred on", and to order them in a descending order. In terms of Time, this means the most recent date should be the first result.
| format=timeline | timelinebands=DAY,MONTH,YEAR | timelineposition=end
This tells the query to return the results in the format of a Timeline. It then says that we want the "Day, Month, and Year" bands to appear (the 3 different levels from which you can view the overall dataset). The "timelineposition" tells the timeline to show the very last result first when it loads.
Service Request Example with Multiple Date Printouts
How long it takes for a Dead Animal to be picked up
{{#ask: [[Service Code Description::DEAD ANIMAL PICK-UP]]
| ?date added
| ?resolution date
| ?Service Code Description
| ?resolution
| ?ward
| sort=date added
| order=ascending
| format=timeline
| timelinebands=DAY,MONTH,YEAR
| timelineposition=end
| limit=30
}}
Resolution date 2 October 2008 12:07
Service Code Description DEAD ANIMAL PICK-UP
Resolution ANIMAL COLLECTED
Ward 8
Service Request:19443312008-10-16T09:54:442008-10-20T11:50:000Date added 16 October 2008 09:54
Resolution date 20 October 2008 11:50
Service Code Description DEAD ANIMAL PICK-UP
Resolution ANIMAL COLLECTED
Ward 5
Service Request:19524862008-10-28T11:29:012008-10-30T12:06:000Date added 28 October 2008 11:29
Resolution date 30 October 2008 12:06
Service Code Description DEAD ANIMAL PICK-UP
Resolution ANIMAL COLLECTED
Ward 6
Service Request:19528342008-10-28T14:34:202008-10-30T12:08:000Date added 28 October 2008 14:34
Resolution date 30 October 2008 12:08
Service Code Description DEAD ANIMAL PICK-UP
Resolution ANIMAL COLLECTED
Ward 8
Service Request:19555502008-10-31T08:11:052008-11-01T12:50:000Date added 31 October 2008 08:11
Resolution date 1 November 2008 12:50
Service Code Description DEAD ANIMAL PICK-UP
Resolution NOTHING FOUND
Ward 1
Service Request:19559252008-10-31T11:12:452008-11-01T12:43:000Date added 31 October 2008 11:12
Resolution date 1 November 2008 12:43
Service Code Description DEAD ANIMAL PICK-UP
Resolution ANIMAL COLLECTED
Ward 7
Service Request:19561262008-10-31T12:41:322008-11-01T12:52:000Date added 31 October 2008 12:41
Resolution date 1 November 2008 12:52
Service Code Description DEAD ANIMAL PICK-UP
Resolution ANIMAL COLLECTED
Ward 5
Service Request:19569282008-11-02T15:12:510Date added 2 November 2008 15:12
Service Code Description DEAD ANIMAL PICK-UP
Resolution NO VALUE ASSIGNED
Ward 7
Service Request:19571092008-11-03T09:03:050Date added 3 November 2008 09:03
Service Code Description DEAD ANIMAL PICK-UP
Resolution NO VALUE ASSIGNED
Service Request:19576482008-11-03T14:52:052008-11-04T12:38:000Date added 3 November 2008 14:52
Resolution date 4 November 2008 12:38
Service Code Description DEAD ANIMAL PICK-UP
Resolution NOTHING FOUND
Ward 8
Service Request:19576682008-11-03T15:05:222008-11-04T12:51:000Date added 3 November 2008 15:05
Resolution date 4 November 2008 12:51
Service Code Description DEAD ANIMAL PICK-UP
Resolution ANIMAL COLLECTED
Ward 7
Service Request:19578852008-11-03T19:09:492008-11-04T12:40:000Date added 3 November 2008 19:09
Resolution date 4 November 2008 12:40
Service Code Description DEAD ANIMAL PICK-UP
Resolution NOTHING FOUND
Ward 8
Service Request:19589162008-11-05T08:28:350Date added 5 November 2008 08:28
Service Code Description DEAD ANIMAL PICK-UP
Resolution NO VALUE ASSIGNED
Ward 7
Service Request:19604362008-11-06T11:24:222008-11-07T09:06:000Date added 6 November 2008 11:24
Resolution date 7 November 2008 09:06
Service Code Description DEAD ANIMAL PICK-UP
Resolution ANIMAL COLLECTED
Ward 5
Service Request:19605352008-11-06T12:23:342008-11-07T09:01:000Date added 6 November 2008 12:23
Resolution date 7 November 2008 09:01
Service Code Description DEAD ANIMAL PICK-UP
Resolution ANIMAL COLLECTED
Ward 5
Service Request:19605712008-11-06T12:42:072008-11-07T09:00:000Date added 6 November 2008 12:42
Resolution date 7 November 2008 09:00
Service Code Description DEAD ANIMAL PICK-UP
Resolution ANIMAL COLLECTED
Ward 5
Service Request:19610692008-11-06T17:40:282008-11-07T09:00:000Date added 6 November 2008 17:40
Resolution date 7 November 2008 09:00
Service Code Description DEAD ANIMAL PICK-UP
Resolution ANIMAL COLLECTED
Ward 6
Service Request:19611072008-11-06T19:19:442008-11-07T09:01:000Date added 6 November 2008 19:19
Resolution date 7 November 2008 09:01
Service Code Description DEAD ANIMAL PICK-UP
Resolution ANIMAL COLLECTED
Ward 5
Service Request:19611282008-11-06T23:06:162008-11-07T09:04:000Date added 6 November 2008 23:06
Resolution date 7 November 2008 09:04
Service Code Description DEAD ANIMAL PICK-UP
Resolution NOTHING FOUND
Ward 8
Service Request:19623732008-11-09T11:55:462008-11-10T09:25:000Date added 9 November 2008 11:55
Resolution date 10 November 2008 09:25
Service Code Description DEAD ANIMAL PICK-UP
Resolution ANIMAL COLLECTED
Ward 6
Service Request:19624552008-11-10T07:34:032008-11-11T09:27:000Date added 10 November 2008 07:34
Resolution date 11 November 2008 09:27
Service Code Description DEAD ANIMAL PICK-UP
Resolution ANIMAL COLLECTED
Ward 6
Service Request:19624792008-11-10T08:04:462008-11-11T09:18:000Date added 10 November 2008 08:04
Resolution date 11 November 2008 09:18
Service Code Description DEAD ANIMAL PICK-UP
Resolution ANIMAL COLLECTED
Service Request:19630222008-11-10T12:11:282008-11-11T09:35:000Date added 10 November 2008 12:11
Resolution date 11 November 2008 09:35
Service Code Description DEAD ANIMAL PICK-UP
Resolution NOTHING FOUND
Ward 7
Service Request:19634172008-11-10T16:50:482008-11-11T09:19:000Date added 10 November 2008 16:50
Resolution date 11 November 2008 09:19
Service Code Description DEAD ANIMAL PICK-UP
Resolution ANIMAL COLLECTED
Ward 4
Service Request:19634232008-11-10T16:53:122008-11-11T09:09:000Date added 10 November 2008 16:53
Resolution date 11 November 2008 09:09
Service Code Description DEAD ANIMAL PICK-UP
Resolution NOTHING FOUND
Ward 2
Service Request:19634332008-11-10T16:58:180Date added 10 November 2008 16:58
Service Code Description DEAD ANIMAL PICK-UP
Resolution NO VALUE ASSIGNED
Ward 3
Service Request:19635472008-11-11T08:13:490Date added 11 November 2008 08:13
Service Code Description DEAD ANIMAL PICK-UP
Resolution NO VALUE ASSIGNED
Ward 6
Service Request:19635602008-11-11T08:53:550Date added 11 November 2008 08:53
Service Code Description DEAD ANIMAL PICK-UP
Resolution NO VALUE ASSIGNED
Ward 3
Service Request:19635832008-11-11T09:53:550Date added 11 November 2008 09:53
Service Code Description DEAD ANIMAL PICK-UP
Resolution NO VALUE ASSIGNED
Ward 6
Service Request:19636892008-11-11T12:52:382008-11-12T09:45:000Date added 11 November 2008 12:52
Resolution date 12 November 2008 09:45
Service Code Description DEAD ANIMAL PICK-UP
Resolution ANIMAL COLLECTED
Ward 8
2008-11-11T12:52:38
{{#ask: [[Service Code Description::DEAD ANIMAL PICK-UP]]
This line tells the query to only return pages that have the Service Code Description of DEAD ANIMAL PICK-UP. Note the case sensitivity.
| ?date added | ?resolution date
This line then tells the Timeline that we want to have 2 different date properties printed on the map. The first one, "Date Added" will place the pages on the timeline based on when they were reported. The second, "resolution date", will then have the timeline draw a bar from the added date to the resolution date.
| ?Service Code Description | ?resolution | ?ward
These are just additional printouts that we would like to see when we click on a page.
| format=timeline | timelinebands=DAY,MONTH,YEAR | timelineposition=end | limit=30
These lines tell the query to return the results in a timeline, with the 3 different views of Day, Month, and Year, and to position the timeline when it loads at the end. Also, we place a limit of 30 results to appear on the timeline.
