-
Notifications
You must be signed in to change notification settings - Fork 0
Revised visualization APIs
Arogya Koirala edited this page Apr 28, 2021
·
2 revisions
-
survey
can take the following values:workers
,businesses
-
var_group
can take the following values:impact
,preparednes
, -
dimension
can take the following values:gender
,edu_levl
,
This was previously /viz/workers/univariate
.
{
"message": "Successfully fetched",
"code": 200,
"data":[
{
variable: "b_has_loan",
title_en: "Do you have any outstanding loans", // maybe not needed if metadata available
title_ne: "", // maybe not needed if metadata available
dist: [
{
label_ne: "",
label_en: "Yes",
total: "",
perc_of_total: "",
},
{
label_ne: "",
label_en: "No",
total: "",
perc_of_total: "",
},
],
},
{
variable: "i_lost_job",
title_en: "Did you lose your job during the pandemic?", // maybe not needed if metadata available
title_ne: "", // maybe not needed if metadata available
dist: [
{
label_ne: "",
label_en: "Yes",
total: "",
perc_of_total: "",
},
{
label_ne: "",
label_en: "No",
total: "",
perc_of_total: "",
},
],
},
];
}
-
survey
can take the following values:workers
,businesses
-
var_group
can take the following values:impact
,preparednes
, -
dimension
can take the following values:gender
,edu_levl
,
This was previously /viz/workers/bivariate
.
{
message: "Successfully fetched",
code: 200,
data: {
univariate: [
{
variable: "m_gender",
title_en: "Do you have any outstanding loans", // maybe not needed if metadata available
title_ne: "",
dist: [
{
label_ne: "",
label_en: "Male",
total: "",
perc_of_total: "",
},
{
label_ne: "",
label_en: "Female",
total: "",
perc_of_total: "",
},
{
label_ne: "",
label_en: "Third gendder",
total: "",
perc_of_total: "",
},
],
},
],
bivariate: [
{
X_variable: "m_gender",
y_variable: "i_took_loan",
title_en: "",
title_ne: "",
chart_data: [
{
x_label_ne: "",
x_label_en: "Male",
y_label_ne: "",
y_label_en: "Yes, took loan",
total: "",
perc_of_total: "",
},
{
x_label_ne: "",
x_label_en: "Female",
y_label_ne: "",
y_label_en: "Yes, took loan",
total: "",
perc_of_total: "",
},
],
},
{
X_variable: "m_gender",
y_variable: "i_sold_assets",
title_en: "",
title_ne: "",
chart_data: [
{
x_label_ne: "",
x_label_en: "Male",
y_label_ne: "",
y_label_en: "Yes, sold assets",
total: "",
perc_of_total: "",
},
{
x_label_ne: "",
x_label_en: "Female",
y_label_ne: "",
y_label_en: "Yes, sold assets",
total: "",
perc_of_total: "",
},
],
},
],
},
};