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

repipes the book #794

Merged
merged 9 commits into from Jun 7, 2022
Merged

repipes the book #794

merged 9 commits into from Jun 7, 2022

Conversation

Nowosad
Copy link
Member

@Nowosad Nowosad commented May 7, 2022

No description provided.

@Nowosad Nowosad requested a review from Robinlovelace May 7, 2022 17:23
@Nowosad Nowosad mentioned this pull request May 7, 2022
@Robinlovelace
Copy link
Collaborator

🎉 to this. In the actions there's something that could cause this: https://github.com/Robinlovelace/geocompr/runs/6335806113?check_suite_focus=true#step:4:4113

Also I suggest we add R (>= 4.2.0) to geocompkg before merging this.

@@ -263,7 +263,7 @@ There are many reasons (linked to the advantages of the simple features model):
- Enhanced plotting performance
- **sf** objects can be treated as data frames in most operations
- **sf** function names are relatively consistent and intuitive (all begin with `st_`)
- **sf** functions can be combined using `%>%` operator and works well with the [tidyverse](http://tidyverse.org/) collection of R packages\index{tidyverse}.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just noticed a typo. That should be:

- **sf** functions can be combined with the `|>` operator and works well with the [tidyverse](http://tidyverse.org/) collection of R packages\index{tidyverse}.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

st_sfc(crs = crs(srtm)) |>
st_sf()
st_sfc(crs = crs(srtm)) %>%
st_sf(geometry = .)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not:

  st_sfc(crs = crs(srtm)) |>
  st_sf(geometry = _)

?

Even if that fails on your computer it should pass on actions. I would be curious to see if it does 🤞

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

Copy link
Collaborator

Choose a reason for hiding this comment

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

Aha didn't see that, looking good 👍

Copy link
Collaborator

@Robinlovelace Robinlovelace left a comment

Choose a reason for hiding this comment

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

Looking great. Please fix merge conflicts and merge if you get a chance Jakub.

@@ -464,16 +464,16 @@ plot(us_southhwest)

\index{vector!geometry casting}
Geometry casting is a powerful operation that enables transformation of the geometry type.
It is implemented in the `st_cast` function from the **sf** package.
Importantly, `st_cast` behaves differently on single simple feature geometry (`sfg`) objects, simple feature geometry column (`sfc`) and simple features objects.
It is implemented in the `st_cast()` function from the **sf** package.
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

st_sfc(crs = crs(srtm)) |>
st_sf()
st_sfc(crs = crs(srtm)) %>%
st_sf(geometry = .)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Aha didn't see that, looking good 👍

zion_transect = cbind(c(-113.2, -112.9), c(37.45, 37.2)) |>
st_linestring() |>
st_sfc(crs = crs(srtm)) |>
st_sf(geometry = _)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice!

st_sf(data.frame(v = 1:n), geometry = .)
zion_many = st_sample(x = zion, size = n) |>
st_buffer(dist = 500) |>
st_sf(data.frame(v = 1:n), geometry = _)
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍 really like this.

@Nowosad Nowosad merged commit 3579906 into main Jun 7, 2022
@Nowosad Nowosad deleted the piper branch June 7, 2022 23:53
github-actions bot pushed a commit that referenced this pull request Jun 8, 2022
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.

None yet

2 participants