-
-
Notifications
You must be signed in to change notification settings - Fork 105
mapscanner #330
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
Comments
Thanks for the submission @mpadge! I'm just working on assigning an editor. Stay tuned! |
Editor checks:
Editor commentsThanks for your submission @mpadge ! Here's the output from goodpractice. You don't need to address these now, it's info for reviewers to use to get started.
── GP mapscanner ─────
It is good practice to
✖ avoid long code lines, it is bad for readability. Also, many people prefer editor windows that are about 80 characters wide. Try make your lines
shorter than 80 characters
R/RcppExports.R:19:1
✖ avoid 'T' and 'F', as they are just variables which are set to the logicals 'TRUE' and 'FALSE' by default, but are not reserved words and hence can
be overwritten by the user. Hence, one should always use 'TRUE' and 'FALSE' for the logicals.
R/aggregate_polys.R:NA:NA
R/aggregate_polys.R:NA:NA
─────────────── Seeking reviewers now 🕐 Reviewers:
|
reviewers are @potterzot && @khondula |
Thanks @sckott - I'm really excited about this package, and looking forward to improvements that will invariably arise in response to reviews. Thanks in advance @potterzot and @khondula for volunteering! The goodpractice T/F outputs are indeed false positives; the long line was not, but has since been fixed. I'm not sure at the mo what might have caused your install issue, but guess some kind of inter-dependency between imported packages? I'll try a clean docker install asap and see if i can replicate. |
@potterzot reminder that your review is due soon |
In just under the deadline! @mpadge thank you for your submission, this is a super cool package. We may end up using it in some work we're doing with water rights, so it's great to see! That said, I couldn't actually get it to download maps given a I printed a USGS topo map and draw a trail on it to check it's application for hiking and was excited with the results. While the package is explicitly aimed at researchers, another use case would be hikers and runners who want to plan a route but don't want to click on an online map. This would let you draw the route, scan it in to the map, and have it uploaded as a shape. If it could be then converted to a GPX file that would be really neat. I've used the below checklist from the rOpensci review template. Comments at the end are my additions. Please feel free to comment with any clarifying questions. Package ReviewPlease check off boxes as applicable, and elaborate in comments below. Your review is not limited to these topics, as described in the reviewer guide
DocumentationThe package includes all the following forms of documentation:
Functionality
Final approval (post-review)
Estimated hours spent reviewing: 8
Review CommentsGeneral CommentsThe package seems great. There are some problems I had with checking and running an example, and some code style differences. I left check boxes above unchecked where there were comments I made to suggest changes. The Specific CommentsErrors
Documentation
Code Style
Code
|
thanks for your review @potterzot ! |
Thank you very much @potterzot for your very considered and constructive review. Before going any further can I please ask you to:
(I haven't yet updated the README and associated docs & vignettes to more explicitly inform of the necessity of a mapbox token, but will do so asap.) In all other ways, your review is very helpful, and I concur with all points you raise, including my ill-chosen use of "scan" throughout. I'll provide a full response as soon as I return from current travels in 2 weeks or so. Note also that your vision of additional use case is brilliant, and one which absolutely should and will be addressed. It's also one which I've been ignoring because of this issue which details how surprisingly difficult it is to extract lines -- and in particular line start and end points -- from raster objects. I really want to solve this, and your use case provides the perfect impetus. Please feel free to chip in any insights you might have on the associated issue as well, because we'd love any and all help in cracking that one. @sckott Any insights from you would also be hugely appreciated! |
@mpadge ah okay, no problem. I have added the code and README/vignette revisions to my review comment and am happy to take a second look after your review response. Adding line extraction would be really neat, but I also don't think it needs to be done as part of the review process. Maybe a later feature down the road. |
@khondula plz and thanks, your review is due in a few days |
Thanks @potterzot for the very productive and helpful review, for which I now offer the following responses, quoting your review comments throughout as appropriate. But first: need for mapbox API tokenThe previous inability to use one of the main functions was caused by my hard-coding an API token as environmental variable, as described above. This has been rectified so that the package will automagically work if it detects any kind of environmental variable with "mapbox" or "mapscan" in the name, otherwise it will prompt the user with the following:
review responses
These should have now been rectified, particularly by rendering the code style of the distinct
and further:
The initial vignette sections describing package motivation and principles of usage have been copied to the
I presume these issues were because of my previous error in handling mapbox API keys, and hope that it should now build once a key has been set via appropriately named environmental variable. (
While the package has 100% coverage, this is admittedly because the bit of code directly responsible for downloading the maptiles is currently not tested. These lines could be mock tested, but would nevertheless require an API key that would have to be hard-coded in one particular way, and would thus still potentially not capture all possible ways by which such keys might be set and used. The new code for dealing with tokens via environmental variables should be failsafe for most use cases, and should issue sufficiently clear guidelines to ensure that tokens are appropriately set, as described above. Errors
The latter, and as far as I can tell, the former as well, were both caused by previous lack of appropriate, and appropriately described need for, mapbox token. Documentation
Documentation for
(See this commit).
These issues extend from the What i have nevertheless done is to implement an automatic reduction in size of large images, as detailed in issue #15. I have fixed the size to ensure files submitted to
As far as I could tell, there was only that one mentioned reference to the package itself doing any "scanning". I have now modified that to say that the function can be used to, "Rectify two previously scanned-in pdf or png maps with
Ping co-author @mdsumner - could you please PR a fix there?
Sorry, I neglected to include the essential
...
Both of those fixed in this commit - thanks for noting!
Done in this commit, so that the initial description of Code Style
Yeah, but it also does not not conform. Like i always say, "white space let's code breathe". I also explicitly mention my white space preferences in
I think I have found and rectified all previous non-spaced instances.
That's just another personal preference of mine to exclude
Sorry @potterzot, but I have to disagree on that one, for reasons that have been very well established in C++. In short, using Code
Done, thanks.
Done as described at length above. Line extractionQuotes from @potterzot:
followed by comment:
I will almost certainly defer this until the end of the review process, as extracting continuous lines from raster data is, as I indicated in my previous comment, exceedingly difficult. |
Package ReviewPlease check off boxes as applicable, and elaborate in comments below. Your review is not limited to these topics, as described in the reviewer guide
DocumentationThe package includes all the following forms of documentation:
Functionality
Final approval (post-review)
Estimated hours spent reviewing: 10
Review CommentsGeneral This is a great package with many potential uses and I'm excited to see it being developed! Unfortunately I was not yet able to get the main functionality working using a scanned in document, as every attempt seems to stall out at the "converting to spatial format" step (details below). I look forward to guidance from the authors to help diagnose my issues and get it working. Assuming these can be resolved, my only other concerns are some areas where the documentation could be improved, and a question about whether there is a need for a mapbox account. Specific comments
Documentation From readme:
From vignette:
Other notes
|
@khondula Before I provide a full response, I wonder if you would be so kind as to send me copies of your failing maps? I am quite concerned that both reviewers have encountered fundamental failures in package functionality, and would myself be loathe to accept a package regardless of all other positive sentiments if I can't get the basic functionality actually working! 😏 If they are not too big, you could maybe just drag them into this issue, and they could be deleted again once I've got them? Or maybe email would be easier - check my gh profile for details. Thanks! |
So @khondula very kindly sent me all of the maps mentioned above. All of them were complete breaking cases, and addressing them has helped enormously to make the package much more robust. Lots of the internal mechanisms have been completely reconceived. The package now makes an initial guess at number of items to be extracted, then estimates a signal-to-noise threshold to optimally identify those features. There is also an additional optional parameter
@khondula could you please confirm that all is okay? And if so, it'd be nice if you could close the corresponding issue on the package repo itself. Thank you so much for helping to greatly improve the package already! Edit: Once you've confirmed that you are now able to get the package working, I'll respond to the rest of your review straight away 😄 |
I spent some time debugging. The tests in As to why this works fine on travis but was failing on my laptop I can't say. The only thing I could think of was perhaps cpp compilers are different but that seems like an obscure error. My A second issueIn the process I realized the vignette contains a lot of hardcoded outputs. I would suggest making these outputs the actual output from the code block. This bit me because when trying to build the vignette I thought it was reporting the actual output of the code block but it wasn't. |
Thanks @potterzot for the PR fix. That's a great catch that took me a while to understand, but yeah, you're absolutely right that the code without that would have errored whenever As for the second issue, most of the vignette runs except for the bits relating to maps of Chennai. These unfortunately have to have fake output because it just takes too long to compile otherwise, and would almost certainly take too long for CRAN checks. The only other bits that use |
Im happy to recommend this package at this point. Thanks for your work
@mpadge!
…On Sat, Oct 26, 2019, 08:08 mark padgham ***@***.***> wrote:
Thanks @potterzot <https://github.com/potterzot> for the PR fix. That's a
great catch that took me a while to understand, but yeah, you're absolutely
right that the code without that would have errored whenever all(dn == 0),
and that's exactly the fix required. Nice.
As for the second issue, most of the vignette runs except for the bits
relating to maps of Chennai. These unfortunately have to have fake output
because it just takes too long to compile otherwise, and would almost
certainly take too long for CRAN checks. The only other bits that use
echo=FALSE are to generate the mapshot images of mapview maps, because
these generate local image files on the first run, and then just use these
from that point on, to avoid re-generating each time. I think that's okay,
but please feel free to suggest any specific alternatives.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#330?email_source=notifications&email_token=AADUQ3WFYUGAFRHYAYWWHCLQQRMNBA5CNFSM4IG2KZH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECKJ6YA#issuecomment-546611040>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADUQ3XXT4XMJ4UUIMMNFBDQQRMNBANCNFSM4IG2KZHQ>
.
|
Approved! Thanks @mpadge for submitting and @khondula and @potterzot for your reviews! A few comments:
To-dos:
For JOSS:
Should you want to acknowledge your reviewers in your package DESCRIPTION, you can do so by making them We've put together an online book with our best practice and tips, this chapter starts the 3d section that's about guidance for after onboarding. Please tell us what could be improved, the corresponding repo is here. |
Thanks @sckott, that is indeed fabulous news. Before proceeding any further, however, I've opened an issue in the repo on something that's been bugging me, and which i want to solve before finishing up here - and which you yourself raised:
It's not the images, it's |
@mpadge as far as the ggplot size issue goes, one option may be to use the |
sounds good, thanks @mpadge |
@potterzot @khondula @sckott Finally back on to this 🚀 I've done my best to reduce the figure sizes, tried every and all permutation possible, and have now got it down to what I consider a sufficiently small size (always < 3.5MB installed size on all machines I've checked on). Happy to ... finally and hopefully ... progress to final stages now. Thanks for bearing with me there 😄 |
thanks @mpadge did another check, all looks good to me. any other comments @khondula or @potterzot ? |
All good for me, thanks @mpadge for your work, and congrats! |
@mpadge i think we're all good, i don't think we'll hear from kelly |
all good from my end! |
ugh, 😢 - foot in mouth - thanks @khondula ! |
@mpadge are we all set? anything left to do? |
Yeah, I still have to do the |
Okay @sckott, thanks for your patience, and now all done I think, including just updating the last check item in the initial list to enable |
yes, good to go! |
@khondula @potterzot Thank you both so much for your very constructive input into the package, which has finally been officially onboarded and transferred to rOpenSci. I'd appreciate it if you'd both be so kind as to consent to being added as reviewers in the package DESCRIPTION file - just a 👍 will do the job, or just let me know if you'd rather not. @sckott Other than that, most of the above item attended to. I'll paste you full list of item and detail everything as soon as that last step is done. Thanks all! |
@sckott Thanks for all of the much appreciated editorial assistance with this package. I'm very excited that it's finally crossed the threshold over to rOpenSci. Here's you checklist of items again to explicitly confirm that I've attended to all points:
That function no longer works, but I gave due credit to both reviewers in the DESCRIPTION.
For JOSS:
Last step not currently possible "Due to Walking Dead World's End" (as sign on a bar in my town helpfully declares). Other than that, it seems to me that that should be sufficient to consider it successfully onboarded, right? 🎉 🕺 Dunno what the status of blog entries and suchlike is in the midst of global restructuring, but whatever can be worked out whenever it might be able to be, i'll be part of it. Thanks! |
Sorry I didn't respond, very happy to have my name included, and
congratulations!
…On Thu, Mar 19, 2020, 07:15 mark padgham ***@***.***> wrote:
@khondula <https://github.com/khondula> @potterzot
<https://github.com/potterzot> Thank you both so much for your very
constructive input into the package, which has finally been officially
onboarded and transferred to rOpenSci. I'd appreciate it if you'd both be
so kind as to consent to being added as reviewers in the package
DESCRIPTION file - just a 👍 will do the job, or just let me know if
you'd rather not. @sckott <https://github.com/sckott> Other than that,
most of the above item attended to. I'll paste you full list of item and
detail everything as soon as that last step is done. Thanks all!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#330 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADUQ3XTLSTPM5SQBUQSK2TRIISJTANCNFSM4IG2KZHQ>
.
|
Yeah, I slightly jumped the gun there and added your name to the DESC before you'd consented - thanks!! |
Yes! Get the JOSS submission done when you can (after they open back up) @stefaniebutland i think this package would make a nice blog post. how should mark proceed? |
Sounds good. @mpadge please see our new rOpenSci Blog Guidelines for Authors and Editors for updated instructions for a blog post or tech note. |
In this period new submissions will not be handled, nor new reviewers assigned.
Reviews and responses to reviews will be handled on a 'best effort' basis, but
no follow-up reminders will be sent. Please check back here again after 25 May when we will be announcing plans to slowly start back up. We express our continued great appreciation for the work of our authors and reviewers. Stay healthy and take care of one other. The rOpenSci Editorial Board |
Submitting Author: mark padgham (@mpadge)
Repository: mpadge/mapscanner
Version submitted: 0.0.1
Editor: @sckott
Reviewer 1: @potterzot
Reviewer 2: @khondula
Archive: TBD
Version accepted: TBD
Scope
Please indicate which category or categories from our package fit policies this package falls under: (Please check an appropriate box below. If you are unsure, we suggest you make a pre-submission inquiry.):
Explain how and why the package falls under these categories (briefly, 1-2 sentences):
mapscanner
fits nicely into both data extraction and geospatial data. It is definitely geospatial because it concerns maps, and ultimately generates spatial output in standard (sf) format. It is nevertheless primarily a "data extraction" tool that extracts useful (spatially) structured data from unstructured input in either pdf or image formats.The target audience comprises social researchers interested in spatial phenomena such as subjective perceptions of regions or areas, or perceptions of location. More specifically, these kinds of analyses are currently restricted to (highly) commercial service provision, and the package aims to aid and empower social researchers in financially disadvantageous circumstances by providing analytic abilities that would otherwise be prohibitively expensive.
No R packages whatsoever that we are aware of. Vaguely similar software exists in other languages, such as
mapmatcher
(injava
; long abandoned) andMaplat
(.js
; mostly in Japanese, and comparable only in algorithmic terms; purpose is entirely different).Pre-submission issue #322, approved for submission by @noamross 🎆
Technical checks
Confirm each of the following by checking the box. This package:
Publication options
JOSS Options
paper.md
matching JOSS's requirements with a high-level description in the package root or ininst/
.MEE Options
Code of conduct
The text was updated successfully, but these errors were encountered: