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

SOTM 2022 Workshop #106

Open
hulsiejames opened this issue Aug 21, 2022 · 9 comments
Open

SOTM 2022 Workshop #106

hulsiejames opened this issue Aug 21, 2022 · 9 comments

Comments

@hulsiejames
Copy link
Collaborator

hulsiejames commented Aug 21, 2022

This issue thread is for feedback, questions, and support during and after the SOTM2022 OSM online workshop - OSM for sustainable transport planning: getting started.

I will update this thread with a link to the recording so that you may watch this in your own time.

The workshop material can be found here.

@GretaTimaite
Copy link
Collaborator

All the tags you will need to run all the openinfra functions. Also see #98

all_extra_tags = c("foot", "bicycle", "access", "service", "maxspeed", "oneway",
                   "kerb", "footway", "sidewalk", "cycleway", "segregated", "highway",
                   "crossing", "lit", "tactile_paving", "surface", "smoothness", "width",
                   "est_width", "lit_by_led", "ref")

@GretaTimaite
Copy link
Collaborator

Participant's issue:
image

I tried on my mac and this is not an issue that I get. My assumption is that it's because of a weak-ish internet connection (that's usually when I get this issue).

If you still get the same issue, I'd go for this (ie delete repos argument):

pkgs = c(
  "tmap",    # package for map making
  "sf",      # geographic vector data classes and functions
  "dplyr",   # data manipulation
  "remotes"  # for installing packages from GitHub
  )

install.packages(pkgs)

@donalhunt
Copy link
Contributor

I think the issues are related to:

  • dependencies missing. might need to add , dependencies = TRUE to the install.packages() command in R
  • missing OS dependencies (I'm seeing a bunch of "please run yum install / apt install" messages.

Will update once I confirm. 👍

@GretaTimaite
Copy link
Collaborator

Great. You can also install one pckage at a time, maybe it will help to figure out which one is causing an issue (or maybe all).

Code example

'''{r}
install.packages("sf")
'''

@donalhunt
Copy link
Contributor

donalhunt commented Aug 21, 2022

managed to install all the debian packages + r packages now I think...

but now getting a different error:

> tm_shape(data |> dplyr::select("highway")) + 
    tm_lines(col = "highway", title.col = "OSM Highways") + 
    tm_layout( legend.bg.alpha = 0.5, legend.bg.color = "white")
Error: unexpected '>' in "tm_shape(data |>"

UPDATE: looks like Debian only ships with R 4.0 and the "|>" (aka "R pipe") is a new construct in R 4.1. currently installing R 4.2 from the relevant repo. 😀

@GretaTimaite
Copy link
Collaborator

Yeah, it looks like base R pipe wasn't liked. This should be ok :

tm_shape(data["highway"]) + 
  tm_lines(col = "highway", title.col = "OSM Highways") + 
  tm_layout( legend.bg.alpha = 0.5, legend.bg.color = "white")

or simply change base R pipe |> to tidy pipe %>% for which load library(tidyverse) loaded:

tm_shape(data %>% dplyr::select("highway")) + 
  tm_lines(col = "highway", title.col = "OSM Highways") + 
  tm_layout( legend.bg.alpha = 0.5, legend.bg.color = "white")

@hulsiejames
Copy link
Collaborator Author

UPDATE: looks like Debian only ships with R 4.0 and the "|>" (aka "R pipe") is a new construct in R 4.1. currently installing R 4.2 from the relevant repo. grinning

Hoping the upgrade to 4.2 has worked, do let us know if you have any more issues.

@donalhunt
Copy link
Contributor

Quick update that after I jumped through all the hoops, I managed to generate the test images.
working through the workshop now. :)

@hulsiejames
Copy link
Collaborator Author

Quick update that after I jumped through all the hoops, I managed to generate the test images.

working through the workshop now. :)

Great news! Were there any particularly tricky fixes you need to apply? (In case someone has the same issue!)

Hope it all goes well, and if you have and more issues for feedback more than happy to help and accept constructive criticism!

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

No branches or pull requests

3 participants