Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uci zurich 2024 #59

Merged
merged 5 commits into from
Sep 10, 2024
Merged

Uci zurich 2024 #59

merged 5 commits into from
Sep 10, 2024

Conversation

DivadNojnarg
Copy link
Collaborator

@christophsax, @jannes-m. Good for review. Since Zurich is welcoming the World road cycling championship in few days, I wanted to mark the occasion.

Copy link

github-actions bot commented Sep 10, 2024

Summary

Status Count
🔍 Total 926
✅ Successful 834
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 64
❓ Unknown 0
🚫 Errors 28

Errors per input

Errors in docs/posts/2020-02-09-tempdisagg/index.html

Errors in docs/posts/2018-05-15-tsbox/index.html

Errors in docs/posts/2020-04-02-dm/index.html

Errors in docs/posts/2021-09-18-tsbox-03/index.html

Errors in docs/posts/2022-04-19-seasonal-1.9/index.html

Errors in docs/posts/2021-03-09-seasonal-1.8/index.html

Errors in docs/posts/2019-04-10-tsbox-01/index.html

Errors in docs/posts/2019-08-12-tsbox-02/index.html

@DivadNojnarg
Copy link
Collaborator Author

CRAN seems out

@jannes-m
Copy link

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.

@christophsax
Copy link
Member

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.

@DivadNojnarg
Copy link
Collaborator Author

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 :)

@DivadNojnarg DivadNojnarg merged commit 90b2533 into main Sep 10, 2024
1 check failed
@DivadNojnarg DivadNojnarg deleted the uci-zurich-2024 branch September 10, 2024 16:08
@DivadNojnarg
Copy link
Collaborator Author

@christophsax It seems we can't publish right now. Will check again later.

@christophsax
Copy link
Member

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.

@christophsax
Copy link
Member

christophsax commented Sep 10, 2024

@DivadNojnarg CRAN up again, and it is live. However, the date appears to be wrong.

@christophsax
Copy link
Member

Also, an authentication error with www.stadiamaps.com

@DivadNojnarg
Copy link
Collaborator Author

Fixed thanks!

@jannes-m
Copy link

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

Standard output and standard error
-- nothing to show --

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants