This map loads GeoJSON feature collections of points (specifically tweets) onto a mapboxGL map for quick visualization.
This map is designed to help explore the movement patterns of geographically vulnerable Twitterers.
If specific date variables are passed in the URL (see below) and the feature properties have hour or minute values, then a time slider and filter is made available.
Configuration
A couple of properties need to be present and in a specific format to work with the mapboxGL filtering functions. Specifically, time is stored not as a date object, but as elapsed time since the first object.
Feature Properties
Features in italics are Optional
m
: minutes elapsed between this feature and the FIRST feature. Optional:h
: (hours)c
: Cluster ID (or color), defines the color of the point (number):-1
(no cluster): steelblue>=0
(clustered): salmon (TODO: These could be distinct)
s
: Speed (in meters per second).text
,time
,user
: Strings that are displayed in the feature popups.
Example GeoJSON Feature Collection
{
"type": "FeatureCollection",
"features": [{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [-74.01416779, 40.70967102]
},
"properties": {
"time": "2017-01-01T00:01:00Z",
"text": "The most influential tweet of 2017.",
"user": "jennningsatcu",
"h": 0,
"m": 0,
"c": 10,
"s":14
}
}]
}
URL Variables (Optional):
geojson
: URL of GeoJSON feature collection matching the above schema (over-rides another file)unit
: Defaults to minutes, but can be set to hours (h
value must be present in this case).