Skip to content
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

Cleanups and moving old code out #6

Merged
merged 67 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
7ea1ba3
removed str() calls for debugging
anguswg-ucsb Jul 30, 2024
7545a6b
cleaned up new versions of fema_utils.R functions that make transect …
anguswg-ucsb Jul 31, 2024
2b8f6b4
changed calc_extension_distance2 to calc_extension_distance in get_ex…
anguswg-ucsb Aug 1, 2024
b896ae7
added a new version of the transect extender for invalid cross secti…
anguswg-ucsb Aug 6, 2024
023b056
moved transect extension functions to there own file, working on impr…
anguswg-ucsb Aug 7, 2024
0d0b369
fixed bug with old variable names in improve_invalid_cs2()
anguswg-ucsb Aug 7, 2024
19de095
removed unassigned verbose value in extend_transects_by_distance()
anguswg-ucsb Aug 8, 2024
3765b77
adding better testing for transect generation steps and slowly moving…
anguswg-ucsb Aug 12, 2024
6ffc3de
added tests for cs points and refactoring cs points to use ids
anguswg-ucsb Aug 14, 2024
1ba9172
continued reworking of codebase to use prescribable IDs, reworked cro…
anguswg-ucsb Aug 20, 2024
82691c5
cleaning up old versions of functions and transitioning to ID based f…
anguswg-ucsb Aug 21, 2024
4ba8406
changed bunch of function names as im moving functions to rely on usi…
anguswg-ucsb Aug 22, 2024
06235b5
reorganzing files and cleaning up names, deleting old code, still wor…
anguswg-ucsb Aug 23, 2024
2ef60f5
added transect-to-cs-pts test and created a file to store utility fun…
anguswg-ucsb Aug 23, 2024
25fb93e
added simple tests for classify_points() function and updated get_ban…
anguswg-ucsb Aug 26, 2024
e0fed30
removed accidental add of a test file to R/ dir, moved those tests to…
anguswg-ucsb Aug 26, 2024
0e77b1c
added code that makes sure that all id / cs_ids get bank attributes a…
anguswg-ucsb Aug 26, 2024
8602642
added tests for specific cross section shapes and how those shapes ge…
anguswg-ucsb Aug 27, 2024
2beff2c
added more classify_points() tests, testing the valid and invalid cas…
anguswg-ucsb Aug 28, 2024
d7beaa4
fixed bugs in get_relief() for handling when cross sections dont have…
anguswg-ucsb Aug 29, 2024
c3efc30
removed old gpkg of flowlines for testing NA depth points
anguswg-ucsb Aug 29, 2024
63337f1
added a simple function for removing entire cross section points from…
anguswg-ucsb Aug 30, 2024
c2f5393
work in progress on improving classification algo
anguswg-ucsb Sep 3, 2024
ceb3e34
small cleanups, working on improving classifcation algo
anguswg-ucsb Sep 4, 2024
f4d2f52
continuing work on improving classification alogirthm and testing
anguswg-ucsb Sep 5, 2024
855058f
work in prgoress on improving classification of cs points algoritmh
anguswg-ucsb Sep 6, 2024
d2edc24
finishing up improvied classification using first and second derivati…
anguswg-ucsb Sep 9, 2024
6ab6b20
finalizing improved classifcation algorithm fro cross sections pts, s…
anguswg-ucsb Sep 11, 2024
a61777f
finalizing classifcation algorithm update, workiung on automating tes…
anguswg-ucsb Sep 11, 2024
46f1514
added crosswalk_id param to get_point_type_counts(), removed pt_id se…
anguswg-ucsb Sep 12, 2024
ecb6532
added functionality for easy generating synthetic cross sections for …
anguswg-ucsb Sep 13, 2024
4e4617c
added more tests for classifying cross section points and added cross…
anguswg-ucsb Sep 18, 2024
e0db01c
continuing refactor of braid detection and adding prescribed IDs to b…
anguswg-ucsb Sep 19, 2024
ad4ba30
refactored all braid / transect fixing code to use prescribed IDs and…
anguswg-ucsb Sep 23, 2024
39d2db1
added tests for get_node_topology, find_connected_componenets, added …
anguswg-ucsb Sep 25, 2024
4ced9c9
fixed bugs in extra fix_braid_transects version, and missing argument…
anguswg-ucsb Sep 25, 2024
e9804d8
fixed old find_braids usage in non exported plotting function, added …
anguswg-ucsb Sep 25, 2024
8507948
updated add_tmp_idand get_unique_tmp_ids() functions to not use tidys…
anguswg-ucsb Sep 25, 2024
7da5fa3
removed old versions of cs improvement functions, added crosswalk_id …
anguswg-ucsb Sep 26, 2024
c152077
fixed missing pipe in get_cs_bottom_lengths() and added it as an expo…
anguswg-ucsb Sep 27, 2024
626726a
added tests for extending transects out to polygons, wip, updated get…
anguswg-ucsb Oct 1, 2024
7cb1bb0
removed internal helper functions from documentation, rebuilt package…
anguswg-ucsb Oct 2, 2024
f94b2eb
added function for generating fake testing data for testing is-valid-…
anguswg-ucsb Oct 2, 2024
01be289
added fuinction for checking function input args types
anguswg-ucsb Oct 4, 2024
2990229
tests for validate_args_types function
anguswg-ucsb Oct 4, 2024
acf3c21
updated package to use new algorithm for classifying cross section po…
anguswg-ucsb Oct 7, 2024
acd5883
fixed logic in extension sides for any and both versions of transect …
anguswg-ucsb Oct 9, 2024
730f812
changed fix_transects file name to fix_braided_transects to match mai…
anguswg-ucsb Oct 11, 2024
7ab6999
added specific ids for cs_vis function plot_cs_pts(), bumped version
anguswg-ucsb Oct 11, 2024
233854e
small cleanup in fix_braided_transects.R
anguswg-ucsb Oct 15, 2024
c969cbd
working on point classifcation for channel pts surrounded by bottom p…
anguswg-ucsb Oct 16, 2024
11a0d13
switched all uses of id = parameters to crosswalk_id =, reformated te…
anguswg-ucsb Oct 18, 2024
7c349a8
fixed get-transects tests that have a bunch of junk code in them
anguswg-ucsb Oct 18, 2024
097863a
utility function for converting cross section point geometry columns …
anguswg-ucsb Oct 21, 2024
2fa77a4
fixed transect to polygon extension left and right flags bug, added a…
anguswg-ucsb Oct 22, 2024
e21eede
began work on improved bottom anchoring functionality, added starter …
anguswg-ucsb Oct 24, 2024
8258a4b
work in progress on global bottom finder algo for point classifications
anguswg-ucsb Oct 24, 2024
55f6535
changed geom to geometry column in extend_by_length, added a convenci…
anguswg-ucsb Oct 25, 2024
d6d75f2
updated renumber_cs_ids() function to make sure to sort by cs_measure…
anguswg-ucsb Oct 28, 2024
c7a8961
validation functions for making sure cs_pts and transect outputs are …
anguswg-ucsb Oct 29, 2024
dc7bc2a
working on cs area calculations
anguswg-ucsb Oct 31, 2024
654173e
cs_area.R functions
anguswg-ucsb Oct 31, 2024
6a12d3a
added cs area function and working on more tests, updated intersectio…
anguswg-ucsb Nov 8, 2024
aa254f1
working on refactopring cs based extensions, wip
anguswg-ucsb Nov 12, 2024
a62a9bf
added a better version of extend_by_length() called adjust_transect_l…
anguswg-ucsb Nov 13, 2024
64394c0
updated transect extensions to polygons to use new intersection logic…
anguswg-ucsb Nov 14, 2024
ba39998
removed many exported functions and set them to be internal functions…
anguswg-ucsb Nov 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ workspace
^[.].*$
^.*/[.].*$
^general_visuals\.R$
^scraps\.R$

^scrap\.r$
^scraps\.r$
^scraps2\.R$
^scraps3\.R$
^braids_tmp\.R$
^braids2\.R$
^braids3\.R$


19 changes: 18 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,21 @@ tmp_plots.R
scraps.R
scraps2.R
scraps3.R
general_visuals.R

# TODO: remove paper related scripts
general_visuals.R
visual_utils.R
paper.R
validity_scoring.R
transect_extensions_viz.R
ras_comp.R
cs_area2.R
cs_based_extensions_viz.R
paper/


scrap.R
braids_tmp.R
braids2.R
braids3.R

8 changes: 6 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: hydrofabric3D
Title: hydrofabric3D
Version: 0.0.96
Version: 0.1.51
Authors@R: c(person("Mike", "Johnson", role = c("aut", "cre"), email = "[email protected]"),
person("Angus", "Watters", role = "aut"),
person("Arash", "Modaresi", role = "ctb"),
Expand All @@ -22,12 +22,16 @@ Imports:
smoothr,
zoo,
nhdplusTools,
hydroloom,
fastmap,
DescTools,
purrr,
ggplot2,
rlang,
lwgeom,
rmapshaper,
AHGestimation
AHGestimation,
methods
Remotes:
mikejohnson51/AHGestimation
Depends:
Expand Down
66 changes: 40 additions & 26 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,55 +1,61 @@
# Generated by roxygen2: do not edit by hand

export(add_angle_at_point_type)
export(add_braid_ids)
export(add_cs_area)
export(add_cs_area2)
export(add_cs_bathymetry)
export(add_middle_index_by_point_type)
export(add_hydrofabric_id)
export(add_is_outlet_flag)
export(add_length_col)
export(add_point_type_counts)
export(add_powerlaw_bankful_width)
export(add_relief)
export(add_tmp_id)
export(adjust_flagged_transects)
export(adjust_transect_lengths)
export(align_banks_and_bottoms)
export(angle_at_index)
export(classify_points)
export(compare_cs_validity)
export(cross_section_pts)
export(cross_section_pts_v2)
export(cross_section_pts_v3)
export(cut_cross_sections)
export(cut_transect)
export(extend_invalid_transects)
export(extend_transects)
export(extend_transects_by_distances)
export(extend_transects_by_length)
export(drop_incomplete_cs_pts)
export(extend_by_length)
export(extend_by_percent)
export(extend_transects_by_cs_attributes)
export(extend_transects_sides)
export(extend_transects_to_polygons)
export(extend_transects_to_polygons2)
export(fill_missing_ahg_coords)
export(find_braids)
export(find_connected_components)
export(fix_braid_transects)
export(find_cs_area2)
export(fix_braided_transects)
export(flag_transects_for_change)
export(geos_extend_line)
export(get_bank_attributes)
export(get_braid_list)
export(get_coords_around_parabola)
export(get_cs_bottom_length)
export(get_extensions_by_id)
export(get_improved_cs_pts)
export(get_point_type_counts)
export(get_relief)
export(get_transect_extension_distances_to_polygons)
export(get_start_node)
export(get_transects)
export(get_unique_tmp_ids)
export(improve_invalid_cs)
export(get_validity_tally)
export(is_braided)
export(make_progress_bar)
export(pct_pts_near_bottom)
export(pick_extension_pts)
export(plot_cs_pts)
export(pts_to_XY)
export(pts_to_reevaluate)
export(rectify_cs)
export(rectify_flat_cs)
export(rectify_summary)
export(subset_polygons_in_transects)
export(subset_transects_in_polygons)
export(unique_braids)
export(unnpack_braids)
export(unpack_braids)
export(validate_transects)
export(validate_transects_against_flowlines)
importFrom(AHGestimation,cross_section)
importFrom(DescTools,AUC)
importFrom(dplyr,`%>%`)
importFrom(dplyr,across)
importFrom(dplyr,add_count)
importFrom(dplyr,all_of)
importFrom(dplyr,any_of)
Expand All @@ -58,6 +64,7 @@ importFrom(dplyr,between)
importFrom(dplyr,bind_rows)
importFrom(dplyr,case_when)
importFrom(dplyr,count)
importFrom(dplyr,distinct)
importFrom(dplyr,ends_with)
importFrom(dplyr,everything)
importFrom(dplyr,filter)
Expand All @@ -71,6 +78,7 @@ importFrom(dplyr,n)
importFrom(dplyr,n_distinct)
importFrom(dplyr,relocate)
importFrom(dplyr,rename)
importFrom(dplyr,row_number)
importFrom(dplyr,rowwise)
importFrom(dplyr,select)
importFrom(dplyr,slice)
Expand Down Expand Up @@ -105,19 +113,24 @@ importFrom(ggplot2,facet_grid)
importFrom(ggplot2,facet_wrap)
importFrom(ggplot2,geom_point)
importFrom(ggplot2,ggplot)
importFrom(hydroloom,add_toids)
importFrom(hydroloom,align_names)
importFrom(hydroloom,hy)
importFrom(hydroloom,make_attribute_topology)
importFrom(hydroloom,make_node_topology)
importFrom(hydroloom,rename_geometry)
importFrom(lwgeom,st_linesubstring)
importFrom(nhdplusTools,get_UT)
importFrom(methods,is)
importFrom(nhdplusTools,get_node)
importFrom(nhdplusTools,get_sorted)
importFrom(nhdplusTools,get_tocomid)
importFrom(nhdplusTools,make_node_topology)
importFrom(nhdplusTools,rename_geometry)
importFrom(purrr,map_dbl)
importFrom(rlang,as_name)
importFrom(rlang,enquo)
importFrom(rmapshaper,ms_simplify)
importFrom(sf,st_as_sf)
importFrom(sf,st_cast)
importFrom(sf,st_centroid)
importFrom(sf,st_coordinates)
importFrom(sf,st_crs)
importFrom(sf,st_distance)
importFrom(sf,st_drop_geometry)
Expand All @@ -141,6 +154,7 @@ importFrom(terra,res)
importFrom(terra,vect)
importFrom(tidyr,pivot_longer)
importFrom(tidyr,pivot_wider)
importFrom(tidyr,separate_rows)
importFrom(tidyr,unnest)
importFrom(utils,str)
importFrom(utils,txtProgressBar)
Expand Down
Loading
Loading