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

Update activity vignette #75

Merged
merged 7 commits into from
Sep 13, 2021
Merged

Update activity vignette #75

merged 7 commits into from
Sep 13, 2021

Conversation

Robinlovelace
Copy link
Collaborator

No description provided.

@Robinlovelace Robinlovelace marked this pull request as ready for review September 13, 2021 19:03
Copy link
Collaborator

@natesheehan natesheehan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff Robin, especially after your 2 am wake up! One copy thing I noticed but everything is reproducible on my side. Happy for you to merge before or after the copy change!

@@ -283,7 +283,8 @@ ab_sf = function(
sf_data = subset(trip_data, select = -c(origin, destination))
sf_linestring = sf::st_sf(
sf_data,
geometry = linestrings
geometry = linestrings,
crs = 4326
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure 👍

od_sf = od::od_to_sf(od, places_sf)
plot(od_sf["departure"], reset = FALSE, key.pos = 1, lwd = 6:2)
plot(places_sf$geometry, pch = places$name, add = TRUE, cex =2)
# mapview::mapview(od_sf["departure"])
```

```{r, eval=FALSE}
od::od_coordinates(od_sf)
As an aside, another way of representing the spatial attributes of the OD data with with four columns with 'X' and 'Y' coordinates for both origins and destinations:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"with with"

@@ -146,9 +168,14 @@ That results in the following file:

```

What do the first 2 trips look like?
You can check the 'round trip' conversion of this JSON representation back into the data frame representation as follows:

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@Robinlovelace
Copy link
Collaborator Author

Great stuff Robin, especially after your 2 am wake up! One copy thing I noticed but everything is reproducible on my side. Happy for you to merge before or after the copy change!

That's what siestas are for!

@@ -189,6 +189,7 @@ ab_json = function(
"if the original input was in 10,000th of a second (used internally by A/B Street)"
)
}
desire_lines$departure = desire_lines$departure * 10000
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Robinlovelace Robinlovelace merged commit bd71ecb into main Sep 13, 2021
@Robinlovelace Robinlovelace deleted the activity-tweaks branch September 13, 2021 20:36
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

Successfully merging this pull request may close these issues.

2 participants