-
Notifications
You must be signed in to change notification settings - Fork 12
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
spatial data #29
spatial data #29
Conversation
- the attempt so far does a spatial join based on the world countries and receives the official country name - afterwards this name is compared to the country code in the c14datelist object - a check column is tested for NAs - a NA can be caused by: 1. a wrong code (as is the case for the mentioned codes vs the iso3166 codes); due to this reason the join is based on the UN codes 2. a code, that is not correctly assigned (since the written codes are part of the UN code list) 3. a missing code, what is also often the case. To Do: - The approach so far is a little messy and should be broken in smaller steps (for better reproducibilty and to not introduce further bugs) - check the iso datatables for consistency; perhaps provide an own table that is state of the art.
Next steps: Continue with longitude
Codecov Report
@@ Coverage Diff @@
## master #29 +/- ##
==========================================
- Coverage 78.31% 71.74% -6.58%
==========================================
Files 24 28 +4
Lines 1033 1129 +96
==========================================
+ Hits 809 810 +1
- Misses 224 319 +95
Continue to review full report at Codecov.
|
I would not yet merge "coordinate_precision.R" since we are still in the phase of writing/finishing/testing the functions; the file from the playground should be deleted before merging the file "determine_country_by_coordinate.R" is ok to be merged, though it is also still undertested. |
As the title of the PR already says: Do not merge yet I just really like the PR interface of github to track changes. :-) |
ahja... ;) in this case: how is it possible to indicate what to be merged and what not? is it possible to review an entire file or am can only review single lines? and...what do you mean by tracking changes? where is the difference to a simple commit log!? |
I'm not aware of a way to exclude certain files or commits from a PR on github. You would need to split that up into different branches and PRs. |
R/finalize_country_name.R
Outdated
|
||
# check if the columns country_coord and country_thes are present | ||
necessary_vars <- c("country_coord", "country_thes") | ||
x %>% check_if_columns_are_present(necessary_vars) |
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.
there is something missing here; where does the pipe lead to?
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 was hoping, that if the check was positive it wouldn´t have to lead anywhere and just move on and if the test is negative the function would be stopped by the check
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.
nice and thanks. let's test this tomorrow during the ISAAK meeting.
R/finalize_country_name.R
Outdated
# pick the most likely result hierarchically from country_coord, country_thes | ||
# and the original input data | ||
x %<>% | ||
dplyr::mutate( | ||
if (country_coord != NA) { | ||
country_final = country_coord | ||
} else if (country_thes ! NA) { | ||
} else if (country_thes != NA) { |
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.
you do not need else if
either use else
or if
todo: - clean precision calculations - change precision functions to helper functions - document text
no "resort" of the lines in the csv but just an adjustment of the order of the columns; should be double checked for consistency
Is your work ready for a review? |
Merge branch 'master' into SQE # Conflicts: # NAMESPACE # R/c14_date_list_clean.R
…rds, butin the spatial wrapper
PR to keep track of the changes