Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
c8dace5
Merge pull request #47 from timriffe/master
TTRustam Oct 17, 2025
fb5b83d
fix rbuildignore
timriffe Oct 17, 2025
4ccb37a
vs up
timriffe Oct 17, 2025
26fe60a
.
timriffe Oct 17, 2025
d2f677e
Avoid duplicate columns in plot_smooth_compare output
cimentadaj Oct 21, 2025
5823eef
Merge pull request #59 from cimentadaj/master
timriffe Oct 22, 2025
c9655e7
Fix lt_summary_chunk mutate to work with modern dplyr by pre-creating…
cimentadaj Nov 9, 2025
c17b792
Merge branch 'master' of https://github.com/timriffe/ODAPbackend
cimentadaj Nov 9, 2025
4f86ec2
Merge pull request #60 from cimentadaj/master
timriffe Nov 10, 2025
a8c5208
.
timriffe Nov 10, 2025
993bdce
Merge branch 'master' of https://github.com/timriffe/ODAPbackend
timriffe Nov 10, 2025
8d225c5
Add check_data_opag validation function for ODAP population data
cimentadaj Nov 21, 2025
293d1d0
Fix .env pronoun reference bug in odap_opag function
cimentadaj Nov 21, 2025
e61ca42
Pre-translate i18n text before map2 to fix scope issues in plot gener…
cimentadaj Nov 21, 2025
9db5400
Add i18n support and plot generation to graduate_auto function
cimentadaj Nov 21, 2025
b2818c2
Simplify WPP parameter handling: remove overwriting logic, only fill …
cimentadaj Nov 23, 2025
5c930e2
Merge branch 'master' of https://github.com/timriffe/ODAPbackend
cimentadaj Nov 23, 2025
fd02318
Merge pull request #61 from cimentadaj/master
timriffe Nov 24, 2025
3fd8db0
fix: normalize graduation scale when converting single ages to 5-year…
cimentadaj Nov 26, 2025
d5bfe73
feat: add check_sex_opag for OPAG-specific sex validation without Total
cimentadaj Nov 27, 2025
d853bf5
feat: add check_data_generic for column-agnostic validation
cimentadaj Nov 27, 2025
f47d174
fix: case-insensitive sex validation and improved smoothing error mes…
cimentadaj Nov 27, 2025
ba99563
Merge branch 'master' of https://github.com/timriffe/ODAPbackend
cimentadaj Nov 27, 2025
66af7ca
Merge pull request #62 from cimentadaj/master
timriffe Dec 4, 2025
eba4a67
removing chaff
timriffe Jan 3, 2026
72c5d28
removes prototypes now living in DemoTools
timriffe Jan 3, 2026
c27e851
Merge pull request #48 from timriffe/master
TTRustam Jan 14, 2026
9e23f38
check_heaping_general now can work with .id
TTRustam Jan 14, 2026
018b2c8
Merge pull request #64 from TTRustam/part_2_2025
timriffe Jan 14, 2026
fe3bab1
updated roxxygen for check_heaping_general, also fixed some warnings …
TTRustam Jan 15, 2026
39af450
Added functions:
TTRustam Feb 17, 2026
a3b6f4b
Merge pull request #65 from TTRustam/part_2_2025
timriffe Feb 26, 2026
55ffd89
.
timriffe Feb 26, 2026
afec404
some TODOs
timriffe Feb 26, 2026
8905146
.
timriffe Feb 26, 2026
5940086
.
timriffe Feb 26, 2026
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
3 changes: 1 addition & 2 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
^.*\.Rproj$
^\.Rproj\.user$
new_flow_control.R
test.R
build.R
.gitignore
ui_flow_control.R
ui_flow_control*.R
heaping_breakpoints.R
R/test2.R
R/test_data_NOT_part_of_final_package.R
Expand Down
10 changes: 7 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: ODAPbackend
Type: Package
Title: Standardize, Evaluate, and Adjust Demographic Data
Version: 00.03.008
Date: 2025-10-15
Version: 00.03.009
Date: 2025-10-16
Authors@R: c(
person("Tim", "Riffe", role = c("aut", "cre"),
email = "tim.riffe@gmail.com", comment = c(ORCID = "0000-0002-2673-4622")),
Expand All @@ -12,7 +12,7 @@ License: file LICENSE
LazyLoad: yes
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.2
RoxygenNote: 7.3.3
Depends:
R (>= 4.1),
ggplot2
Expand All @@ -23,6 +23,10 @@ Suggests:
Imports:
DemoTools (>= 01.13.85),
stringr,
codetools,
wpp2024,
forcats,
ungroup,
dplyr,
scales,
readxl,
Expand Down
26 changes: 23 additions & 3 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,34 @@
export(capture_args)
export(check_coherent)
export(check_data)
export(check_data_generic)
export(check_data_graduate_time)
export(check_data_heaping)
export(check_data_lifetable)
export(check_data_opag)
export(check_groupid)
export(check_has_numeric)
export(check_heaping_general)
export(check_heaping_user)
export(check_interpolate)
export(check_lower)
export(check_missing_cols)
export(check_missing_cols_generic)
export(check_missing_cols_opag)
export(check_nas)
export(check_nlx_if_present)
export(check_numeric)
export(check_numeric_opag)
export(check_redundant)
export(check_rows)
export(check_sequential)
export(check_sex)
export(check_smooth)
export(check_sex_opag)
export(create_groupid)
export(extension_check)
export(graduate_auto)
export(graduate_auto_5)
export(graduate_time)
export(interp_linear)
export(interpolate)
export(lt_check)
Expand All @@ -28,7 +39,6 @@ export(lt_flexible_chunk)
export(lt_plot)
export(lt_summary)
export(lt_summary_chunk)
export(movepop)
export(odap_opag)
export(plot_compare_rates)
export(plot_histogram)
Expand All @@ -40,7 +50,6 @@ export(plot_smooth_compare)
export(pyramid)
export(read_data)
export(smooth1d)
export(smooth1d_chunk)
export(smooth_flexible)
export(smooth_flexible_chunk)
importFrom(DemoTools,OPAG)
Expand All @@ -55,6 +64,7 @@ importFrom(DemoTools,graduate)
importFrom(DemoTools,graduate_mono)
importFrom(DemoTools,graduate_uniform)
importFrom(DemoTools,groupAges)
importFrom(DemoTools,int2age)
importFrom(DemoTools,is_abridged)
importFrom(DemoTools,is_age_coherent)
importFrom(DemoTools,is_age_redundant)
Expand All @@ -81,6 +91,7 @@ importFrom(cowplot,plot_grid)
importFrom(dplyr,.data)
importFrom(dplyr,across)
importFrom(dplyr,arrange)
importFrom(dplyr,as_tibble)
importFrom(dplyr,bind_rows)
importFrom(dplyr,case_match)
importFrom(dplyr,case_when)
Expand All @@ -101,13 +112,15 @@ importFrom(dplyr,last)
importFrom(dplyr,left_join)
importFrom(dplyr,mutate)
importFrom(dplyr,n)
importFrom(dplyr,pick)
importFrom(dplyr,pull)
importFrom(dplyr,reframe)
importFrom(dplyr,rename)
importFrom(dplyr,select)
importFrom(dplyr,summarise)
importFrom(dplyr,summarize)
importFrom(dplyr,ungroup)
importFrom(forcats,as_factor)
importFrom(furrr,future_map_dfr)
importFrom(future,multisession)
importFrom(future,plan)
Expand All @@ -126,9 +139,11 @@ importFrom(ggplot2,ggplot)
importFrom(ggplot2,ggtitle)
importFrom(ggplot2,guide_legend)
importFrom(ggplot2,labs)
importFrom(ggplot2,scale_color_brewer)
importFrom(ggplot2,scale_color_discrete)
importFrom(ggplot2,scale_color_manual)
importFrom(ggplot2,scale_fill_brewer)
importFrom(ggplot2,scale_linetype_manual)
importFrom(ggplot2,scale_x_continuous)
importFrom(ggplot2,scale_x_log10)
importFrom(ggplot2,scale_y_continuous)
Expand All @@ -140,6 +155,7 @@ importFrom(ggplot2,theme_minimal)
importFrom(grDevices,gray)
importFrom(magrittr,"%>%")
importFrom(mgcv,gam)
importFrom(mgcv,s)
importFrom(parallelly,availableCores)
importFrom(purrr,map)
importFrom(purrr,map2)
Expand All @@ -159,10 +175,12 @@ importFrom(scales,comma)
importFrom(scales,label_log)
importFrom(scales,pretty_breaks)
importFrom(signal,interp1)
importFrom(stats,gaussian)
importFrom(stats,loess)
importFrom(stats,loess.control)
importFrom(stats,na.omit)
importFrom(stats,predict)
importFrom(stats,qlogis)
importFrom(stats,smooth.spline)
importFrom(stats,splinefun)
importFrom(stats,supsmu)
Expand All @@ -171,6 +189,7 @@ importFrom(stringr,str_detect)
importFrom(stringr,str_flatten)
importFrom(tibble,as_tibble)
importFrom(tibble,lst)
importFrom(tibble,rownames_to_column)
importFrom(tibble,tibble)
importFrom(tidyr,pivot_longer)
importFrom(tidyr,pivot_wider)
Expand All @@ -180,6 +199,7 @@ importFrom(tidyselect,all_of)
importFrom(tidyselect,any_of)
importFrom(tidyselect,everything)
importFrom(tidyselect,matches)
importFrom(ungroup,pclm)
importFrom(utils,data)
importFrom(utils,globalVariables)
importFrom(utils,installed.packages)
Expand Down
39 changes: 39 additions & 0 deletions R/basepop.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@


# TODO:
# make wrapper following the same input-output format as smooth_flexible(),
# modified to the needs of basepop.

# We either have 5-year-in - 5-year out, single-year-in - single-year-out,
# or abridged-in - abridged out.

# for the case of 5-year-in 5-year out, one can either graduate to single,
# run basepop_single(), then group to 5-year, or one can graduate to single (pclm),
# abridge ages, then run basepop_five(). Let's do this second one; example seen
# in DemoTools documentation of basepop_five()

# age regrouping should be handled elsewhere.
# TR recommends first graduating and then running basepop,
# not the other way around

# Two main DemoTools functions to use are basepop_five() and basepop_single().

#remotes::install_github("timriffe/DemoTools")

# The trick here is in showing how a user might actually practically give their
# own inputs rather than relying on the default wpp.















140 changes: 0 additions & 140 deletions R/basepop_single_sketch.R

This file was deleted.

Loading