Skip to content

Commit

Permalink
Versión 0.0.1.9002 (#69)
Browse files Browse the repository at this point in the history
* Version 0.0.1.9001
Squashed commit of the following:

commit b34c9ab
Author: Mauro Loprete <[email protected]>
Date:   Wed Oct 23 23:03:26 2024 -0300

    Fix version

commit 97c20fd
Author: Mauro Loprete <[email protected]>
Date:   Wed Oct 23 08:59:03 2024 -0300

    Fix test class in recode to formula

commit ed7dc02
Author: Mauro Loprete <[email protected]>
Date:   Wed Oct 23 01:25:21 2024 -0300

    Fix NAMESPACE

commit 91c5e6e
Author: Mauro Loprete <[email protected]>
Date:   Wed Oct 23 01:15:15 2024 -0300

    Fix test

commit dd6a142
Merge: 43f4488 141b33c
Author: Mauro Loprete <[email protected]>
Date:   Wed Oct 23 01:12:52 2024 -0300

    Merge branch 'develop' into feature/use_lazy_evaluation

commit 141b33c
Author: Mauro Loprete <[email protected]>
Date:   Wed Oct 23 01:12:02 2024 -0300

    Fix pkgdown site

commit 3dc687f
Author: Mauro Loprete <[email protected]>
Date:   Wed Oct 23 00:59:44 2024 -0300

    fix bake_Recipe.rd

commit 8f7a6ed
Author: Mauro Loprete <[email protected]>
Date:   Wed Oct 23 00:59:44 2024 -0300

    fix bake_Recipe.rd

commit 43f4488
Author: Mauro Loprete <[email protected]>
Date:   Wed Oct 23 00:59:44 2024 -0300

    fix bake_Recipe.rd

commit 350aa42
Merge: c67167f 92c75c2
Author: Mauro Loprete <[email protected]>
Date:   Wed Oct 23 00:55:40 2024 -0300

    Merge pull request #46 from metasurveyr/develop

    Lazy evaluation

commit c67167f
Merge: 56ad8cc e8c88fc
Author: Mauro Loprete <[email protected]>
Date:   Sun Oct 13 20:13:26 2024 -0300

    Merge pull request #44 from metasurveyr/develop

    Fix test vignettes

commit 56ad8cc
Merge: bacca81 e84baa5
Author: Mauro Loprete <[email protected]>
Date:   Sun Oct 13 11:31:51 2024 -0300

    Merge pull request #42 from metasurveyr/develop

    Develop

* Response in public key debug

* Fix host mongo US

* visNetwork to suggests (#64)

* Workflow return only result

* New logo closes #66

* Fix/remove emoji (#68)

* Remove emoji dependence

* Remove emoji cat recipe

* Remove emoji set_weight

* Squashed commit of the following:

commit e8b6493cef28c1ab406d70b54006dd527ac70cbd
Author: Mauro Loprete <[email protected]>
Date:   Sun Oct 27 23:07:23 2024 -0300

    Upgrade version

commit 5b04c3a56c8cfb90b3361769b812cb3556be209d
Author: Mauro Loprete <[email protected]>
Date:   Sun Oct 27 23:07:00 2024 -0300

    Update docs

commit 874ebbd6df72c3d5c9ad98a76bbfdf72c5dabc69
Author: Mauro Loprete <[email protected]>
Date:   Sun Oct 27 23:06:36 2024 -0300

    Add new functionality estimation_type to workflow

commit bca9a88a6f6fe68f5b4f49b32bc8eeb930b38870
Author: Mauro Loprete <[email protected]>
Date:   Sun Oct 27 23:06:11 2024 -0300

    New function add_weight and fix params

commit 18cf4b10e64d8e8bf56745ec6df90477c168c497
Author: Mauro Loprete <[email protected]>
Date:   Sun Oct 27 23:05:34 2024 -0300

    Update cat, attributes design and weight to list

commit 6b98d209e0e4b6dffa443f2c6f9d840081182e90
Author: Mauro Loprete <[email protected]>
Date:   Sun Oct 27 23:04:32 2024 -0300

    Fix example load_survey to add_weight

commit 8d32e160f8b1f0a5ac900abf05f158b45df63d7d
Author: Mauro Loprete <[email protected]>
Date:   Sun Oct 27 23:04:07 2024 -0300

    Remove comment assign R/steps

commit a684058
Author: Mauro Loprete <[email protected]>
Date:   Sun Oct 27 16:45:59 2024 -0300

    Closes #67

    New functions extract_time_pattern group_dates validate_time_pattern R/utils.R
     On branch feature/53-pool-survey
    Your branch is up to date with 'origin/feature/53-pool-survey'.

commit 63d326d
Author: Mauro Loprete <[email protected]>
Date:   Sun Oct 27 12:43:11 2024 -0300

    Rbuildingore and gitingore

* Fix quarter to quarterly and semester to biannual

* update docs
  • Loading branch information
mauroloprete authored Oct 28, 2024
1 parent 96dddb7 commit 494ed6f
Show file tree
Hide file tree
Showing 19 changed files with 521 additions and 133 deletions.
4 changes: 4 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ example-data
eaii.R$
test_api.R
popac.R
^_pkgdown\.yml$
^reference$
^pkgdown$
pool.R
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,5 @@ inst/doc
/Meta/


*.json
*.json
reference
8 changes: 4 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: metasurvey
Title: Survey Processing with Meta-Programming
Version: 0.0.1.9001
URL: www.mauroloprete.com
Version: 0.0.1.9002
URL: https://github.com/metasurveyr/metasurvey
Authors@R:
c(
person(
Expand All @@ -21,6 +21,7 @@ Authors@R:
)
)
)
Logo: man/figures/logo.png
Description: Provides a set of functions to process survey data using meta-programming. It is designed to work with the 'survey' package, but it can be used with any other package that provides a similar data structure. The main goal of this package is to provide a set of functions that can be used to process survey data in a more efficient way, by using meta-programming to generate code that can be used to process the data.
License: GPL (>= 3)
Imports:
Expand All @@ -32,11 +33,10 @@ Imports:
lifecycle (>= 1.0.0),
jsonlite (>= 1.7.2),
R6 (>= 2.5.0),
emoji (>= 15.0),
visNetwork (>= 2.0.9),
survey (>= 4.2.1),
methods
Suggests:
visNetwork (>= 2.0.9),
roxygen2 (>= 7.1.2),
testthat (>= 3.0.0),
tibble (>= 3.1.3),
Expand Down
12 changes: 4 additions & 8 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
# Generated by roxygen2: do not edit by hand

export(add_weight)
export(bake_recipes)
export(bake_steps)
export(cat_design)
export(cat_design_type)
export(cat_recipes)
export(default_engine)
export(extract_time_pattern)
export(get_api_key)
export(get_data)
export(get_engine)
export(get_metadata)
export(get_recipe)
export(get_steps)
export(group_dates)
export(lazy_default)
export(load_survey)
export(load_survey_example)
Expand All @@ -31,6 +34,7 @@ export(survey_to_data.table)
export(survey_to_data_frame)
export(survey_to_tibble)
export(use_copy_default)
export(validate_time_pattern)
export(view_graph)
export(workflow)
importFrom(R6,R6Class)
Expand All @@ -50,7 +54,6 @@ importFrom(data.table,data.table)
importFrom(data.table,fread)
importFrom(data.table,melt)
importFrom(data.table,rbindlist)
importFrom(emoji,emoji)
importFrom(glue,glue)
importFrom(glue,glue_col)
importFrom(glue,identity_transformer)
Expand All @@ -66,10 +69,3 @@ importFrom(methods,is)
importFrom(stats,coef)
importFrom(survey,SE)
importFrom(survey,cv)
importFrom(visNetwork,addFontAwesome)
importFrom(visNetwork,visEdges)
importFrom(visNetwork,visGroups)
importFrom(visNetwork,visHierarchicalLayout)
importFrom(visNetwork,visLegend)
importFrom(visNetwork,visNetwork)
importFrom(visNetwork,visOptions)
4 changes: 2 additions & 2 deletions R/load_survey.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' @title Load survey
#' @title Load survey
#'
#' @param path Path to the survey file
#' @param svy_type Type of survey
Expand All @@ -13,7 +13,7 @@
#' svy_example <- load_survey(
#' svy_type = "eaii",
#' svy_edition = "2019-2021",
#' svy_weight = "w_trans",
#' svy_weight = add_weight(annual = "w_trans"),
#' input = "https://raw.githubusercontent.com/metasurveyr/metasurvey_data/main/eaii/2019-2021.csv",
#' dec = ","
#' )
Expand Down
30 changes: 13 additions & 17 deletions R/steps.R
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,6 @@ step_compute <- function(svy = NULL, ..., .by = NULL, use_copy = use_copy_defaul
.names_after <- names(get_data(.svy_after))
.new_vars <- names(exprs)[-1]

# assign("new_vars", .new_vars_temp, envir = .GlobalEnv)

if (length(.new_vars) > 0) {
.name_step <- paste0(
"New variable: ",
Expand Down Expand Up @@ -443,13 +441,6 @@ get_type_step <- function(steps) {
#' View graph
#' @param svy Survey object
#' @param init_step Initial step
#' @importFrom visNetwork visNetwork
#' @importFrom visNetwork visGroups
#' @importFrom visNetwork visEdges
#' @importFrom visNetwork visHierarchicalLayout
#' @importFrom visNetwork visLegend
#' @importFrom visNetwork visOptions
#' @importFrom visNetwork addFontAwesome
#' @return Graph
#' @keywords Survey methods
#' @keywords Steps
Expand All @@ -462,6 +453,10 @@ view_graph <- function(svy, init_step = "Load survey") {
formulas <- get_formulas(steps)
comments <- get_comments(steps)

if (!requireNamespace("visNetwork", quietly = TRUE)) {
stop("Package 'visNetwork' is required for this function. Please install it.")
}

if (init_step == "Load survey") {
init_step <- glue::glue_col(
"
Expand Down Expand Up @@ -519,12 +514,12 @@ view_graph <- function(svy, init_step = "Load survey") {
)
)

visNetwork(
visNetwork::visNetwork(
nodes = nodes,
edges = edges,
height = "500px", width = "100%"
) |>
visGroups(
visNetwork::visGroups(
groupname = "Load survey",
shape = "icon",
icon = list(
Expand All @@ -533,7 +528,7 @@ view_graph <- function(svy, init_step = "Load survey") {
),
shadow = list(enabled = TRUE)
) |>
visGroups(
visNetwork::visGroups(
groupname = "compute",
shape = "icon",
icon = list(
Expand All @@ -542,7 +537,7 @@ view_graph <- function(svy, init_step = "Load survey") {
),
shadow = list(enabled = TRUE)
) |>
visGroups(
visNetwork::visGroups(
groupname = "recode",
shape = "icon",
icon = list(
Expand All @@ -551,9 +546,9 @@ view_graph <- function(svy, init_step = "Load survey") {
),
shadow = list(enabled = TRUE)
) |>
addFontAwesome() |>
visEdges(arrows = "to") |>
visHierarchicalLayout(
visNetwork::addFontAwesome() |>
visNetwork::visEdges(arrows = "to") |>
visNetwork::visHierarchicalLayout(
direction = "LR",
levelSeparation = 200
) |>
Expand All @@ -562,12 +557,13 @@ view_graph <- function(svy, init_step = "Load survey") {
clickToUse = TRUE,
manipulation = FALSE
) |>
visLegend(
visNetwork::visLegend(
width = 0.2,
position = "left",
main = "Type",
zoom = FALSE
)

}


Expand Down
Loading

0 comments on commit 494ed6f

Please sign in to comment.