arcs_data.Rd
Custimise arcs on a globe.
arcs_data(globe, data) arcs_label(globe, label) arcs_start_lat(globe, lat = "startLat") arcs_start_lon(globe, lon = "startLng") arcs_end_lat(globe, lat = "endLat") arcs_end_lon(globe, lon = "endLng") arcs_color(globe, color = constant("#ffffaa")) arcs_altitude(globe, altitude) arcs_altitude_scale(globe, scale = 0.5) arcs_stroke(globe, stroke) arcs_curve_resolution(globe, curve = 64L) arcs_circular_resolution(globe, circular = 6L) arcs_dash_length(globe, length = 1L) arcs_dash_gap(globe, gap = 0L) arcs_dash_initial_gap(globe, gap = 0L) arcs_dash_animate(globe, ms = 0L) arcs_transition(globe, ms = 0L) arcs_on_click(globe, func) arcs_on_right_click(globe, func) arcs_on_hover(globe, func)
globe | An object of class |
---|---|
data | A data.frame containing arcs data. |
label | Column name containing label or a charcater vector. Supports html. |
lat, lon | Column names or numeric value indicating starting and ending coordinates of arc(s). |
color | Column name or character vector indicating color of points. |
altitude | Column name or a numeric constant for the arc's maximum altitude
(ocurring at the half-way distance between the two points) in terms of globe radius
units (0 = a numeric constant for the scale of the arc's automatic altitude, in terms of units of the great-arc distance between the two points. A value of 1 indicates the arc should be as high as its length on the ground. Only applicable if arcAltitude is not set.0 altitude (ground line), 1 = globe radius). If a value of null or
undefined is used, the altitude is automatically set proportionally to the distance
between the two points, according to the scale set in |
scale | Column name or a numeric constant for the scale of the arc's automatic
altitude, in terms of units of the great-arc distance between the two points. A
value of 1 indicates the arc should be as high as its length on the ground.
Only applicable if |
stroke | Column name indicating the line's diameter, in angular degrees. A value of null or undefined will render a ThreeJS Line whose width is constant (1px) regardless of the camera distance. Otherwise, a TubeGeometry is used. |
curve | Resolution, expressed in how many straight line segments to divide the curve by. Higher values yield smoother curves. |
circular | Radial geometric resolution of each line,
expressed in how many slice segments to divide the tube's circumference.
Only applicable when using Tube geometries (defined |
length | Column name or numeric giving the length of the dashed
segments in the arc, in terms of relative length of the whole line
( |
gap | Column name or numeric giving the length of the gap between dash segments, in terms of relative line length. |
ms | Colum name or numeric for the time duration (in ms) to animate the motion of dash positions from the start to the end point for a full line length. A value of 0 disables the animation. |
func | JavaScript function as character vector. |
create_globe() %>% arcs_data(usflights) %>% arcs_start_lat("start_lat") %>% arcs_start_lon("start_lon") %>% arcs_end_lat("end_lat") %>% arcs_end_lon("end_lon")