ropensci-archive / scrubr

:warning: ARCHIVED :warning: Clean species occurrence records
Other
34 stars 10 forks source link

coord_uncertain,a function to deal with 'coordinateUncertaintyInMeters' #24

Closed vamsikrishna97 closed 7 years ago

vamsikrishna97 commented 7 years ago

Hi, My motive was to take coordinateUncertainityInMeters into consideration while flagging imprecise points.

I have created a separate function to deal with this coord_uncertain(x, coorduncertainityLimit=30000, drop=T, ignore.na=F)

Parameters- x (data.frame) A data.frame coorduncertainityLimit (numeric) numeric limit of the coordinateUncertainityInMeters variable drop (logical) Drop bad data points or not ignore.na (logical) To consider NA as a bad point or not

sckott commented 7 years ago

also update your version from here (upstream) as i pushed a few changes to make sure builds pass

vamsikrishna97 commented 7 years ago

Hi, Thanks for your feedback. In order to add examples, I'd have to create another sample_data because none of the present ones has coordinateUncertainityInMeters variable. Are there any set guidelines to follow to create sample_data or can I use any data which would work for my function? I have corrected all the rookie mistakes and will update it soon. Thanks Vamsi

sckott commented 7 years ago

@vamsikrishna97 for a sample data set, add a documentation entry in https://github.com/ropensci/scrubr/blob/master/R/scrubr_datasets.R once you've settled on the format - try to keep the data as small as possible - save the data.frame in data/ using save() (make sure the object saved is the same name as the filename to make it easier on everyone)

codecov-io commented 7 years ago

Codecov Report

Merging #24 into master will increase coverage by 3.65%. The diff coverage is 93.33%.

@@            Coverage Diff            @@
##           master     #24      +/-   ##
=========================================
+ Coverage   55.25%   58.9%   +3.65%     
=========================================
  Files          15      15              
  Lines         333     348      +15     
=========================================
+ Hits          184     205      +21     
+ Misses        149     143       -6
Impacted Files Coverage Δ
R/coord-funs.R 51.61% <93.33%> (+12.16%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 50036b7...63bfc90. Read the comment docs.

sckott commented 7 years ago

@vamsikrishna97 let me know when you're done

vamsikrishna97 commented 7 years ago

Hi, I am trying to figure out why my PR is failing the codecov tests and I haven't been successful yet. Is there something simple I am missing here?

vamsikrishna97 commented 7 years ago

Hi, Added tests for coord_incomplete, coord_unlikely and coord_uncertain in order to increase the code coverage.

vamsikrishna97 commented 7 years ago

Hi, I was also thinking to add more tests for the rest of the functions if you are okay with it?

sckott commented 7 years ago

I was also thinking to add more tests for the rest of the functions if you are okay with it?

no, like to keep pull requests focused on a single topic

sckott commented 7 years ago

thanks @vamsikrishna97

looks good