Closed DivadNojnarg closed 2 weeks ago
Status | Count |
---|---|
🔍 Total | 926 |
✅ Successful | 834 |
⏳ Timeouts | 0 |
🔀 Redirected | 0 |
👻 Excluded | 64 |
❓ Unknown | 0 |
🚫 Errors | 28 |
CRAN seems out
This looks very interesting and great that you analyze your own tracked data. For next time, I would suggest to use the mapview rather than the leaflet package, since it is a bit easier to use. However, this is of course up to personal taste.
Very nice! I cannot comment on the cycling stuff, though.
Fixed some typos.
If you want to merge, it should work and publish, without the link checker to succeed.
Thanks for the quick review @jannes-m and @christophsax. Very much appreciated. My plan is to follow up after the race with another blog post :)
@christophsax It seems we can't publish right now. Will check again later.
Sorry, @DivadNojnarg, I was mistaken: We changed the behavior for cynkraweb but not for cynkrablog (https://github.com/cynkra/cynkraweb/commit/ec83260ece9b6b1b9ce18b8c93b4bcee57a2b490). cynkraweb does no longer require the link checker to pass before publish. Perhaps something we could do something like this here as well.
@DivadNojnarg CRAN up again, and it is live. However, the date appears to be wrong.
Also, an authentication error with www.stadiamaps.com
Fixed thanks!
FWIW: I would use the sf package for geographic vector data, however, it requires some system dependencies in the background (for how to install see https://github.com/r-spatial/sf). Unfortunately, the reprex package appears to no longer support interactive output. So give it a try yourself if you like.
library("sf")
#> Linking to GEOS 3.13.0, GDAL 3.9.2, PROJ 9.4.1; sf_use_s2() is TRUE
library("mapview")
library("leaflet")
url = "https://zurich2024.com/wp-content/uploads/2024/08/GPX-22-Winterthur-Zurich-1.gpx"
sf::st_layers(url)
#> Driver: GPX
#> Available layers:
#> layer_name geometry_type features fields crs_name
#> 1 waypoints Point 9 23 WGS 84
#> 2 routes Line String 1 12 WGS 84
#> 3 tracks Multi Line String 0 12 WGS 84
#> 4 route_points Point 10687 25 WGS 84
#> 5 track_points Point 0 26 WGS 84
routes = read_sf(url, layer = "route_points")
waypoints = read_sf(url, "waypoints")
# convert points into a linestring for mapping
l = dplyr::group_by(routes, route_fid) |>
dplyr::summarize(do_union = FALSE) |>
st_cast("LINESTRING")
# alternatively you could also use
# l = read_sf(url, layer = "routes")
# it seems reprex no longer works with interactive output, so pls try it
# yourself
# mapview(l) +
# mapview(waypoints)
# leaflet() %>%
# addTiles() %>%
# addCircleMarkers(data = st_coordinates(waypoints)) %>%
# addPolylines(data = st_coordinates(l)[, 1:2])
plot(st_geometry(l))
plot(st_geometry(waypoints), add = TRUE, cex = 3, pch = 16, col = "lightblue")
Created on 2024-09-10 with reprex v2.1.1
@christophsax, @jannes-m. Good for review. Since Zurich is welcoming the World road cycling championship in few days, I wanted to mark the occasion.