Title: | A set of tools for interacting with KoBo and analyzing datasets from it |
---|---|
Description: | A set of tools for interacting with KoBo and analyzing datasets from it. |
Authors: | Iyed Ghedamsi [aut, cre] |
Maintainer: | Iyed Ghedamsi <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.0.0.9003 |
Built: | 2024-11-25 03:38:31 UTC |
Source: | https://github.com/iyedg/quiveR |
Generate a changelog from two data frames.
generate_changelog( .x, .y, id_cols, names_to = "question", .x_values_to = "raw_value", .y_values_to = "transformed_value" )
generate_changelog( .x, .y, id_cols, names_to = "question", .x_values_to = "raw_value", .y_values_to = "transformed_value" )
.x |
data frame x |
.y |
data frame y |
id_cols |
columns common between x and y that uniquely identify observations |
names_to |
name of the column containing the pivoted column names |
.x_values_to |
name of the column containing values from x |
.y_values_to |
name of the column containing values from y |
data frame
select multiple
questionGet the columns corresponding to a select multiple
question
get_question_columns(.df, question_label, group_sep = "/")
get_question_columns(.df, question_label, group_sep = "/")
.df |
The survey data frame |
question_label |
The label of the question |
group_sep |
The group separator used in the KoBo export |
A list of columns that correspond to each individual possible choice
for question_label
get_question_columns(lby_msna2021, "safety_concerns") get_question_columns(lby_msna2021, "safety_concerns_boys") get_question_columns(lby_msna2021, "safety_concerns_girls")
get_question_columns(lby_msna2021, "safety_concerns") get_question_columns(lby_msna2021, "safety_concerns_boys") get_question_columns(lby_msna2021, "safety_concerns_girls")
A mapping of Libyan Municipality names and a harmonized name used by REACH for that Municipality.
harmonized_municipality_names
harmonized_municipality_names
An object of class character
of length 8.
A mapping of Libyan Neighborhood names and a harmonized name used by REACH for that Neighborhood.
harmonized_neighborhood_names
harmonized_neighborhood_names
An object of class character
of length 2.
Download survey responses as a dataset
kobo_download_dataset( server_url = "https://kobo.humanitarianresponse.info", type = "xls", lang = "English", fields_from_all_versions = TRUE, group_sep = "/", asset_uid, user_name, user_password, file_path, max_retries = 12 )
kobo_download_dataset( server_url = "https://kobo.humanitarianresponse.info", type = "xls", lang = "English", fields_from_all_versions = TRUE, group_sep = "/", asset_uid, user_name, user_password, file_path, max_retries = 12 )
server_url |
URL of the KoBo Server |
type |
Filetype for the export |
lang |
Language of the labels used in the export. Can be 'xls' |
fields_from_all_versions |
Whether to include fields from all versions of the survey |
group_sep |
The character separator for groups |
asset_uid |
The UUID of the survey |
user_name |
The User Name |
user_password |
The Password |
file_path |
The file path to which the dataset is saved |
max_retries |
The number of retries when downloading |
Parse a KoBo expression into R.
kobo_parse_expression(statement, as_string = FALSE)
kobo_parse_expression(statement, as_string = FALSE)
statement |
a string representing a KoBo expression |
as_string |
whether to transform the result of parsing into an expression |
an R expression or its string representation
kobo_parse_expression("${hoh}") kobo_parse_expression("${hoh}", as_string = TRUE) kobo_parse_expression("selected(${hoh}, 'no')") kobo_parse_expression("selected(${hoh}, 'no')", as_string = TRUE) lby_msna2021 %>% dplyr::filter(!!kobo_parse_expression("selected(${hoh}, 'no')")) %>% dplyr::distinct(hoh)
kobo_parse_expression("${hoh}") kobo_parse_expression("${hoh}", as_string = TRUE) kobo_parse_expression("selected(${hoh}, 'no')") kobo_parse_expression("selected(${hoh}, 'no')", as_string = TRUE) lby_msna2021 %>% dplyr::filter(!!kobo_parse_expression("selected(${hoh}, 'no')")) %>% dplyr::distinct(hoh)
A dataset containing the identifiers as well as the Arabic and English names of Libyan Districts
lby_districts
lby_districts
An object of class data.frame
with 22 rows and 4 columns.
A unique identifier for the District
The Districts' name in Arabic
The Districts' name in English
The region to which the Districts belongs
In response to a lack of recent data on the humanitarian situation in Libya, REACH conducted a multi-sectoral needs assessment (MSNA) from June-July 2021 to provide timely information on the needs and vulnerabilities of refugees and migrants. REACH designed the data collection and analysis tools, and consulted with all sectors and working groups active in the Libyan response to revise indicators.
lby_msna2021
lby_msna2021
An object of class tbl_df
(inherits from tbl
, data.frame
) with 1554 rows and 690 columns.
In response to a lack of recent data on the humanitarian situation in Libya, REACH conducted a multi-sectoral needs assessment (MSNA) from June-July 2021 to provide timely information on the needs and vulnerabilities of refugees and migrants. REACH designed the data collection and analysis tools, and consulted with all sectors and working groups active in the Libyan response to revise indicators.
lby_msna2021_choices
lby_msna2021_choices
An object of class tbl_df
(inherits from tbl
, data.frame
) with 1351 rows and 7 columns.
In response to a lack of recent data on the humanitarian situation in Libya, REACH conducted a multi-sectoral needs assessment (MSNA) from June-July 2021 to provide timely information on the needs and vulnerabilities of refugees and migrants. REACH designed the data collection and analysis tools, and consulted with all sectors and working groups active in the Libyan response to revise indicators.
lby_msna2021_survey
lby_msna2021_survey
An object of class tbl_df
(inherits from tbl
, data.frame
) with 242 rows and 17 columns.
A dataset containing the identifiers as well as the Arabic and English names of Libyan Municipalities
lby_municipalities
lby_municipalities
An object of class data.frame
with 100 rows and 5 columns.
A unique identifier for the Municipality
The Municipality's name in Arabic
The Municipality's name in English
The district to which the Municipality belongs
The region to which the Municipality belongs
A dataset containing the identifiers as well as the Arabic and English names of Libyan Regions
lby_regions
lby_regions
An object of class data.frame
with 3 rows and 3 columns.
A unique identifier for the Region
The Region's name in Arabic
The Region's name in English