-
Notifications
You must be signed in to change notification settings - Fork 6
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
Review for ropensci #32
Comments
This is a great map but it adds ~13 MB to the package size as it's embedded in the html of the vignette. Plan: add link to interactive version. |
Perfect, that is a much better idea!
Should I put it on branch rev2-fix?
…On Sun, Jun 13, 2021 at 9:03 PM Robin ***@***.***> wrote:
This is a great map but it adds ~13 MB to the package size as it's
embedded in the html of the vignette. Plan: add link to interactive version.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#32 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJKLUXXXZLLCFKNHNYR4SSLTSUFJDANCNFSM46TUJCSA>
.
|
Just saw that you already did that on
1942e94
:)
…On Sun, Jun 13, 2021 at 9:44 PM rosa ***@***.***> wrote:
Perfect, that is a much better idea!
Should I put it on branch rev2-fix?
On Sun, Jun 13, 2021 at 9:03 PM Robin ***@***.***> wrote:
> This is a great map but it adds ~13 MB to the package size as it's
> embedded in the html of the vignette. Plan: add link to interactive version.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#32 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AJKLUXXXZLLCFKNHNYR4SSLTSUFJDANCNFSM46TUJCSA>
> .
>
|
For #32, fixes the issue installation issue: * Installation instructions work and are straightforward, however it would be helpful to add some information about MapBox, and that an API key is needed for some functions. Also note that for some functions, there are packages that will need to be installed separately as they are not installed automatically (i.e., are in `Suggests` - `ceramic`, `ggdist`, etc.)
… leave "slope_.." for funcions that deal with slope values - not elevation. #32
Draft reply to Andy's review: above. Draft reply to Dan's review, below... |
We have greatly improved the documentation and there is now a statement of need in the README, with a link for people wanting further details. See 7c2ac57
We have updated the benchmark, which is now in a separate vignette, and which no longer requires data download, good point!
We have updated the documentation, could you clarify it you can reproduce it now? Does the updated information in Get Started helps? |
The README has be substantially updated and now documents the package's main functions: dbacab8
More detailed responses in-line
Draft response to review 2:
We have made substantial improvements to the vignettes. There is now an updated introductory
slopes.Rmd
vignette that demonstrates all key function and a shorter README that links to the other vignettes. The more theoretical introduction to slopes has been moved into a new vignette,intro-to-slopes
. See here for details: #38Function Documentation
This has been done in 018d2d6. Many thanks for the tip.
@return
sections\value{...}
sections have been added to the .Rd files using#' @return
in the source code thanks toroxygen2
. See commit 7a8cdc5Datasets
This is a good point, we put the dataset docs together in a rush. They have been iteratively improved, including in this commit: 4506845
Thanks for the comment. We agree that the argument names were at times overly terse and we now find ourselves wishing we spent more time thinking about this earlier on. The good news is that, after some initial issues, we have now got updated and consolidated argument names, as documented here: https://github.com/ITSLeeds/slopes/pull/31/files. To summarise that we now have:
@param routes Routes, the gradients of which are to be calculated.
replacingr
@param dem Raster overlapping with
routesand values representing elevations
replacinge
@param elevations Elevations in same units as x (assumed to be metres)
also replacinge
We also updated arg names in the plotting functions in 7651276
elevation_get()
The documentation of this function has been improved, as can be seen in https://itsleeds.github.io/slopes/reference/elevation_get.html. Specifically, we link to long form documentation explaining how to get an API key, rather than duplicating content in the function documentation. We also link explicitly to the
cc_elevation()
page for people who want more details. Note: we do not see this functionality, that is reliant on potentially temperamental web APIs, as core to the package so we do not want to emphasise this aspect of the package, believing that it's better if users get and understand their own DEM data using other tools, in line with the Linux philosophy of modularity. See 7a67e2d for details on updated links to the ceramic package.elevation_extract()
documentationThe documentation has been improved as a result of this comment. See 18b0a5d for details.
One question for the reviewers: should this function even be exported? It seems of little additional use compared with the original
extract()
functions for users but we thought it worth asking and minimising changes. If nothing else the documentation is now more interesting!plot_dz
@param
tags have been shifted up into the exported functionplot_slope()
. All parameters are now better documented, with improved names (legend_position
instead ofx
, for example) and default values.ifelse
statement. The parameter is still set with a default but now thatcolorspace
is imported it is guaranteed to work.plot_slope()
argumentsThe parameter name has been clarified and renamed:
plot_slope()
changesAgreed, the
plot_slope()
function is the one that people will use and it was confusing having bothplot_slope()
and the more esoteric helper functionplot_dz
exported. Onlyplot_slope()
is now exported and the documentation is better. Also, the colourscheme has been updated so 0 corresponds with white, which was not previously the case.sequential_dist()
The description of the input
m
has been updated and now provides this important information:Note: this change also benefits the
slope_matrix()
functions. See 7637f45 for details.elevation_add()
) - this is now described in README and in Get Started vignette. d9c40ca?slope_vector
Agreed, this has been fixed in bcd382a
slope_matrix_mean()
This function has been added: https://itsleeds.github.io/slopes/reference/slope_matrix.html
slope_xyz
Good point. This, plus other improvement to the docs for this function, have been made in cb0e2e5 - wondering if the function should ever have been exported but it's there now and think it could be useful for others. Especially now it's better documented!
We call
sf
and tend to avoid the::
in the examples, although believe it is useful in some places in the package, e.g. to concisely to demonstrate that a function is from a particular package. See e854cb4 for details.We think that the use of simple interger values in the examples supports understanding by allowing people to see how they work from first principles, without needing to think of long lon/lat values. The examples in the vignettes, and the examples in the functions that do the 'heavy lifting' that are most commonly used by users, have real world examples. We would be happy to improve any specific examples that are not clearly explained. Overall, we have improved the documentation but we would welcome any further guidance on examples that should be improved.
This is a good point that would also cause issues for the CRAN submission. Addressed in fe5f12d
route_cyclestreets
docsThis has been fixed, as can be seen here: https://itsleeds.github.io/slopes/reference/cyclestreets_route.html
dem_lisbon_raster
exampleFixed in f21d4a9
slope_raster()
exampleThis has been fixed in 4c7e207
We have added new tests for the
directed
edge cases and the 'stop` functions. We think improved function behaviour should catch more user mistakes but welcome any further feedback on improving the tests further.We agree with the comments. The package now imports
geodist
,colorspace
andpbapply
. There is now description of installing the packages and API token needed for downloading DEMs in the README after 327d5f4. We have added a codemeta file. Function and argument names, and docs, have been improved thanks to the review process.We have removed the commented code, experiments from early versions of the package code. The codebase should be easier to read now.
We have not yet added caching. We think think could represent 'mission creep'. We have, however, added a link to a description of caching tiles in the
ceramic
package in 3d324feWe have removed the unused
file
argument, simplifying the function: 66de731This is a good point. Fix documented in #36
pbapply
importsAgreed and fixed. We were being overly averse to importing packages, to the point where it was increasing code complexity. Good news: switching this to Imports saved 6 lines of condition checking code: eb434d5
elevation_extract()
suggestionSee b153e6a thanks for the suggestion
na.rm = TRUE
for z_min() and z_max().sf
vssfc
/sfg
objectsFor some functions such as
slope_xyz()
andslope_raster()
passing geometry objects toroutes
seems to work already, we have updated the docs accordingly.We found a case where passing an
sfc
object can cause issues, as illustrated in the reprex below from a previous version:Created on 2021-09-04 by the reprex package (v2.0.1)
This wasted resources because it downloaded the tiles while the user could have saved time by knowing that it was going to fail due to the class early. We think that requiring
sf
inputs is reasonable given the package's aim of being a high level tool for adding slope variables tosf
data frames that already have attributes.We tried the following:
But it seemed to add complexity for little benefit. However, we have added more safety checks in a cases where
sfc
were found to fail. Happy to further iterate on this if there are other functions that don't work as expected with sfc objects but we expect and encourage most users to use sf objects as inputs, unless there are benefits of catering for and documentingsfc
use cases that we have not considered a3bfcecTrue that, hadn't noticed all that duplication, sloppy coding! Fixed in fbe5740
colorspace
added to importsplot_slope()
argument passingGood point. See fix in 9d7bddd
elevation_get()
Agreed, this was due to issues with
raster
reprojection code and newwkt
CRS definitions. New approach withterra
resolves this issue, as shown in 4476a38slope_3d
(nowslope_xyz()
) code duplicationWe agree that there was unnecessary duplicated code. We acted on this by removing redundant code, removing one of the conditions completely: 6ba560d
The function, now called elevation add, still has plenty of complexity and could probably be simplified further but, after attempting to do so were not sure how best to progress considering that additional helper functions also create complexity and lines of code, we could not find a way to add helper functions here that would lead to substantial improvements:
Agreed, see comments above re argument names, we have now renamed
r
ande
toroutes
,dem
andelevations
to reflect the different meanings ofe
and for clarity.The first argument of
plot_slope()
is nowroute_xyz
, reflecting the fact the function takes a single route with 'xyz' coordinates f9de5ccAgreed, this would be interesting. We have added a new vignette at https://itsleeds.github.io/slopes/articles/roadnetworkcycling.html that shows the importance of route breakpoints.
The text was updated successfully, but these errors were encountered: