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

Merge 'dev' into 'main' #32

Merged
merged 64 commits into from
Jul 23, 2024
Merged
Changes from 1 commit
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
a4e9f43
1. Creating vignette for additional parameters
KovaZo Jul 30, 2023
affb8b6
Zensus api start
KovaZo Sep 16, 2023
5e2ff5b
modify gen_table
yannikbuhl Sep 28, 2023
38a0a1d
Update restatis function, Addding zensus interaction
KovaZo Oct 4, 2023
0d38e68
code review and minor adaptions
yannikbuhl Oct 22, 2023
558d543
Githubissue rlang
KovaZo Nov 17, 2023
3613be5
Worked on additional parameter vignette + implementing the results/si…
KovaZo Nov 17, 2023
3954914
minor adjustments
yannikbuhl Dec 3, 2023
83b2f47
Merge branch 'zensus' of https://github.com/CorrelAid/restatis into z…
yannikbuhl Dec 3, 2023
a3e7a03
Changes based on Feedback
KovaZo Dec 8, 2023
8468fac
fix decimal mark problem in gen_table()
yannikbuhl Jan 10, 2024
6e8a9ca
Changes mainly for val2var2stat and utils
KovaZo Jan 22, 2024
af1c3d7
new check param cube/Table
yannikbuhl Jan 22, 2024
6fb5be6
reformatting, adding logincheck, adding support for application/zip
yannikbuhl May 20, 2024
a114611
Updates from Zoran regarding regionalstatistik and new functions
KovaZo Jun 21, 2024
76b0ec1
varval error = true
KovaZo Jun 21, 2024
6552fe6
update regio link and package purrr/rvest
KovaZo Jun 25, 2024
0a57db4
update link regio
KovaZo Jun 25, 2024
5b078f5
update DESCRIPTION
yannikbuhl Jun 30, 2024
817b103
new function logincheck
yannikbuhl Jun 30, 2024
a02e9c3
update gen_api from zensus branch
yannikbuhl Jul 1, 2024
2deff84
update gen_auth from zensus branch
yannikbuhl Jul 1, 2024
96ef2da
update DESCRIPTIONh from zensus branch
yannikbuhl Jul 1, 2024
7f5c69f
gen_logincheck
yannikbuhl Jul 1, 2024
8c57005
add parameter to read in data as all character
yannikbuhl Jul 1, 2024
1eb6e09
changes
KovaZo Jul 2, 2024
32a95cb
Updates für tests
KovaZo Jul 2, 2024
0485749
fixes and stuff
yannikbuhl Jul 2, 2024
0887f25
fix gen_logincheck
yannikbuhl Jul 3, 2024
41b720f
fix gen_table gen_jobs
yannikbuhl Jul 5, 2024
c67f5e1
Updates Zoran before testing
KovaZo Jul 5, 2024
5f123ec
prepare PR
yannikbuhl Jul 7, 2024
7fcf10e
Merge pull request #30 from CorrelAid/yannik_zensus
yannikbuhl Jul 7, 2024
4fba08c
update documentation pt.1
yannikbuhl Jul 8, 2024
8d29e1a
improve docs pt.2
yannikbuhl Jul 8, 2024
b3ca07c
lösung catalouge
KovaZo Jul 9, 2024
bd70207
zoran gen_find
KovaZo Jul 9, 2024
f39895c
fix tests
yannikbuhl Jul 9, 2024
7a315f5
fix last tests
yannikbuhl Jul 10, 2024
d8fbeb5
update Zensus API URL
yannikbuhl Jul 11, 2024
c32c9d5
gen_catalouge anpassung
KovaZo Jul 11, 2024
363c88e
Updates for zensus
KovaZo Jul 12, 2024
2593b37
database check update
KovaZo Jul 12, 2024
3530762
changes in checks and texts
KovaZo Jul 12, 2024
5b37627
add support for API tokens
yannikbuhl Jul 13, 2024
9c0f6da
fix tests
yannikbuhl Jul 14, 2024
b482db8
rewrite gen_auth_save
yannikbuhl Jul 14, 2024
90a7084
fixes
yannikbuhl Jul 14, 2024
958e69f
fixeeeees
yannikbuhl Jul 14, 2024
0eb0260
fixes
yannikbuhl Jul 16, 2024
8d8e81b
fix authorization with token
yannikbuhl Jul 16, 2024
06e137f
fix gen cat
yannikbuhl Jul 18, 2024
abeda78
fix stuff
yannikbuhl Jul 18, 2024
8b35592
fix test
yannikbuhl Jul 18, 2024
c785b88
update vignettes
yannikbuhl Jul 19, 2024
c38f3fd
fix vignette
yannikbuhl Jul 20, 2024
0279867
Merge pull request #31 from CorrelAid/zensus
yannikbuhl Jul 20, 2024
5cc5104
new readme
yannikbuhl Jul 20, 2024
a309352
add NEWS, CRAN comments and fix vignette
yannikbuhl Jul 20, 2024
326ce2a
fix error tests for cran/ci
yannikbuhl Jul 20, 2024
016c85c
some last changes
yannikbuhl Jul 21, 2024
f669442
resolve merge conflicts
yannikbuhl Jul 21, 2024
54d5560
fix DESC
yannikbuhl Jul 21, 2024
97ff9c9
fix fix fix
yannikbuhl Jul 21, 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
Prev Previous commit
Next Next commit
Updates for zensus
KovaZo committed Jul 12, 2024

Verified

This commit was signed with the committer’s verified signature.
marekful Marcell Fülöp
commit 363c88e7649c02afbc0f155a79d8b8669adcb3f9
17 changes: 9 additions & 8 deletions R/gen_find.R
Original file line number Diff line number Diff line change
@@ -425,7 +425,7 @@ gen_find <- function(term = NULL,

} else {

df_stats <- find_token(results_json$Variables,
df_variables <- find_token(results_json$Variables,
error.input = error.ignore,
text = verbose,
sub_category = "Variables")
@@ -546,15 +546,16 @@ gen_find <- function(term = NULL,
df_cubes <- "There are generally no 'cubes' objects available for the 'zensus' database."

}
}

#---------------------------------------------------------------------------

list_resp <- list(
"Tables" = if("tables" %in% category) { tibble::as_tibble(df_table) },
"Statistics" = if("statistics" %in% category) { tibble::as_tibble(df_stats) },
"Variables" = if("variables" %in% category) { tibble::as_tibble(df_variables) },
"Cubes" = if("cubes" %in% category) { tibble::as_tibble(df_cubes) }
)
list_resp <- list()

if("tables" %in% category) {list_resp$Tables <- tibble::as_tibble(df_table) }
if("statistics" %in% category) {list_resp$Statistics <- tibble::as_tibble(df_stats) }
if("variables" %in% category) {list_resp$Variables <- tibble::as_tibble(df_variables) }
if("cubes" %in% category) {list_resp$Cubes <- tibble::as_tibble(df_cubes) }

attr(list_resp, "Term") <- results_json$Parameter$term
attr(list_resp, "Database") <- rev_database_function(db)
@@ -565,7 +566,7 @@ gen_find <- function(term = NULL,
return(list_resp)

}
}})
})

res <- check_results(res)

4 changes: 1 addition & 3 deletions R/gen_objects2var.R
Original file line number Diff line number Diff line change
@@ -174,9 +174,7 @@ gen_objects2var <- function(code = NULL,

if ("cubes" %in% category && db == "gen_zensus_api") {

df_cubes <- "No 'cubes' object available for 'zensus'-database."

return(df_cubes)
df_cubes <- "There are generally no 'cubes' objects available for the 'zensus' database."

} else if ("cubes" %in% category && (db == "gen_api" || db == "gen_regio_api")) {

6 changes: 6 additions & 0 deletions R/utils_dataprocessing.R
Original file line number Diff line number Diff line change
@@ -1131,8 +1131,14 @@ test_database_function <- function(input){

res <- c("genesis" = "gen_api", "zensus" = "gen_zensus_api", "regio" = "gen_regio_api")

} else if(length(res) != length(input)){

stop("One or more of the specified databases are not part of this package. Currently only 'genesis', 'zensus', and 'regio' are implemented.",
call. = FALSE)
}

#-----------------------------------------------------------------------------

if (identical(res, c())){

stop("You have to correctly specifiy a 'database' parameter. Please refer to the documentation for further information.",