-
Notifications
You must be signed in to change notification settings - Fork 586
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 text in c3 for v2 #658
Conversation
Minor changes added in spare moment between family commitments : ) |
This reverts commit ad1f633.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional comments:
- Robin, it seems that I do not fully understand how our book build works. Some of your changes are not merged yet, but I can already read them at https://geocompr.robinlovelace.net/attr.html. Why is that? Do we update the book based on PRs?
- Do we mention pivots (pivot_longer, pivot_wider) and binds (cbind and rbind) anywhere in the book? I think these are some basic operations very useful to get most data in shape.
- We should update exercises and solutions. I plan to do it for terra-related parts in the next few weeks.
``` | ||
|
||
## Introduction | ||
|
||
Attribute data is non-spatial information associated with geographic (geometry) data. | ||
A bus stop provides a simple example: its position would typically be represented by latitude and longitude coordinates (geometry data), in addition to its name. | ||
The name is an *attribute*\index{attribute} of the feature (to use Simple Features terminology) that bears no relation to its geometry. | ||
The [Elephant & Castle / New Kent Road](https://www.openstreetmap.org/relation/6610626) stop in London, for example has coordinates of -0.098 degrees longitude and 51.495 degrees latitude which can be represented as `POINT (-0.098 51.495)` in the `sfc` representation described in Chapter \@ref(spatial-class). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The @ref(spatial-class) reference seems broken.
Key functions for subsetting data frames (including `sf` data frames) with **dplyr** functions are demonstrated below. | ||
<!-- The sentence below seems to be untrue based on the benchmark below. --> | ||
<!-- `dplyr` is also faster than base R for some operations, due to its C++\index{C++} backend. --> | ||
<!-- Something on dbplyr? I've never seen anyone use it regularly for spatial data 'in the wild' so leaving out the bit on integration with dbs for now (RL 2021-10) --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would omit dbplyr for now. Maybe we could mention it in the bridges chapter (I never used it in the spatial context, though).
**dplyr** functions enable 'tidy' workflows which some people (the authors of this book included) find intuitive and productive for interactive data analysis, especially when combined with code editors such as RStudio that enable [auto-completion](https://support.rstudio.com/hc/en-us/articles/205273297-Code-Completion-in-the-RStudio-IDE) of column names. | ||
Key functions for subsetting data frames (including `sf` data frames) with **dplyr** functions are demonstrated below. | ||
<!-- The sentence below seems to be untrue based on the benchmark below. --> | ||
<!-- `dplyr` is also faster than base R for some operations, due to its C++\index{C++} backend. --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This dataset is fairly small. Could you try it on larger datasets (with 1,000s or more of rows)?
`slice()` is the row-equivalent of `select()`. | ||
The following code chunk, for example, selects the 3^rd^ to 5^th^ rows: | ||
The following code chunk, for example, selects rows 1 to 6: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 to 6?
That was my fault, fixed (reverted) now: ad1f633 |
Now mentioned
I think that is fine, people can, and are encouraged to, read-up on data manipulation techniques elsewhere. I think it's fine not to mention |
Agreed, I didn't look at the exercises. I think we can do that after updating the content for each chapter, and I imagine they will get useful feedback during the review process. |
Yes but that comment was made on an outdated version of the content. The block is now shorter and simpler: library(sf) # vector data package introduced in Chapter 2
library(terra) # raster data package introduced in Chapter 2
library(dplyr) # tidyverse package for data frame manipulation |
in response to review from @Nowosad thanks!
in response to review comment: #658 (comment)
in response to #658 (comment) from @Nowosad, agreed
In response to #658 (review)
Yes - this is the only comment in this PR that I made a few weeks ago (not today). |
Aha, apologies. Only saw (or re-saw?) that comment now! |
No description provided.