Skip to content

Commit

Permalink
add inadvertently deleted payload files back in
Browse files Browse the repository at this point in the history
  • Loading branch information
rtesra committed Jan 10, 2024
1 parent b8b99a6 commit cedd4a9
Show file tree
Hide file tree
Showing 15 changed files with 424 additions and 0 deletions.
3 changes: 3 additions & 0 deletions inst/payload/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Payloads

These are example payloads for sending to the API. Some of these are templates and need to have additional info e.g. version added to work. To generate a payload with the latest version use the `setup_payload_*` functions from `R/payload_helpers.R`.
14 changes: 14 additions & 0 deletions inst/payload/model_calibrate_payload.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"options": {
"spectrum_plhiv_calibration_level": "national",
"spectrum_plhiv_calibration_strat": "sex_age_group",
"spectrum_artnum_calibration_level": "national",
"spectrum_artnum_calibration_strat": "sex_age_coarse",
"spectrum_infections_calibration_level": "national",
"spectrum_infections_calibration_strat": "sex_age_coarse",
"spectrum_aware_calibration_level": "national",
"spectrum_aware_calibration_strat": "sex_age_coarse",
"calibrate_method": "logistic"
},
"version": "<+version_info+>"
}
26 changes: 26 additions & 0 deletions inst/payload/model_run_options_payload.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"shape": {
"path": "testdata/malawi.geojson",
"filename": "malawi.geojson",
"hash": "12345",
"fromADR": false
},
"survey": {
"path": "testdata/survey.csv",
"filename": "survey.csv",
"hash": "12345",
"fromADR": false
},
"programme": {
"path": "testdata/programme.csv",
"filename": "programme.csv",
"hash": "12345",
"fromADR": false
},
"anc": {
"path": "testdata/anc.csv",
"filename": "anc.csv",
"hash": "12345",
"fromADR": false
}
}
84 changes: 84 additions & 0 deletions inst/payload/model_submit_payload.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"data": {
"pjnz": {
"path": "testdata/Malawi2019.PJNZ",
"filename": "Malawi2019.PJNZ",
"hash": "12345",
"fromADR": false,
"resource_url": null
},
"shape": {
"path": "testdata/malawi.geojson",
"filename": "malawi.geojson",
"hash": "12345",
"fromADR": false,
"resource_url": null
},
"population": {
"path": "testdata/population.csv",
"filename": "population.csv",
"hash": "12345",
"fromADR": false,
"resource_url": null
},
"survey": {
"path": "testdata/survey.csv",
"filename": "survey.csv",
"hash": "12345",
"fromADR": false,
"resource_url": null
},
"programme": {
"path": "testdata/programme.csv",
"filename": "programme.csv",
"hash": "12345",
"fromADR": false,
"resource_url": null
},
"anc": {
"path": "testdata/anc.csv",
"filename": "anc.csv",
"hash": "12345",
"fromADR": false,
"resource_url": null
}
},
"options": {
"area_scope": "MWI",
"area_level": 4,
"calendar_quarter_t1": "CY2016Q1",
"calendar_quarter_t2": "CY2018Q3",
"calendar_quarter_t3": "CY2019Q2",
"calendar_quarter_t4": "CY2022Q3",
"calendar_quarter_t5": "CY2023Q3",
"survey_prevalence": ["DEMO2016PHIA", "DEMO2015DHS"],
"survey_art_coverage": "DEMO2016PHIA",
"survey_recently_infected": "DEMO2016PHIA",
"include_art_t1": "true",
"include_art_t2": "true",
"anc_clients_year2": 2018,
"anc_clients_year2_num_months": "9",
"anc_prevalence_year1": 2016,
"anc_prevalence_year2": 2018,
"anc_art_coverage_year1": 2016,
"anc_art_coverage_year2": 2018,
"spectrum_population_calibration": "none",
"spectrum_plhiv_calibration_level": "none",
"spectrum_plhiv_calibration_strat": "sex_age_coarse",
"spectrum_artnum_calibration_level": "none",
"spectrum_artnum_calibration_strat": "sex_age_coarse",
"spectrum_infections_calibration_level": "none",
"spectrum_infections_calibration_strat": "sex_age_coarse",
"spectrum_aware_calibration_level": "none",
"spectrum_aware_calibration_strat": "sex_age_coarse",
"calibrate_method": "logistic",
"artattend_log_gamma_offset": -4,
"artattend": false,
"output_aware_plhiv": "true",
"rng_seed": 17,
"no_of_samples": 500,
"max_iter": 250,
"psnu_level": null
},
"version": "<+version_info+>"
}
55 changes: 55 additions & 0 deletions inst/payload/model_submit_payload_minimal.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"data": {
"pjnz": {
"path": "testdata/Malawi2019.PJNZ",
"filename": "Malawi2019.PJNZ",
"hash": "12345",
"fromADR": false
},
"shape": {
"path": "testdata/malawi.geojson",
"filename": "malawi.geojson",
"hash": "12345",
"fromADR": false
},
"population": {
"path": "testdata/population.csv",
"filename": "population.csv",
"hash": "12345",
"fromADR": false
},
"survey": {
"path": "testdata/survey.csv",
"filename": "survey.csv",
"hash": "12345",
"fromADR": false
}
},
"options": {
"area_scope": "MWI",
"area_level": 4,
"calendar_quarter_t1": "CY2016Q1",
"calendar_quarter_t2": "CY2018Q3",
"calendar_quarter_t3": "CY2019Q2",
"calendar_quarter_t4": "CY2022Q3",
"calendar_quarter_t5": "CY2023Q3",
"survey_prevalence": ["DEMO2016PHIA", "DEMO2015DHS"],
"survey_art_coverage": "DEMO2016PHIA",
"survey_recently_infected": "DEMO2016PHIA",
"spectrum_population_calibration": "none",
"spectrum_plhiv_calibration_level": "none",
"spectrum_plhiv_calibration_strat": "sex_age_group",
"spectrum_artnum_calibration_level": "none",
"spectrum_artnum_calibration_strat": "age_coarse",
"spectrum_infections_calibration_level": "none",
"spectrum_infections_calibration_strat": "age_coarse",
"calibrate_method": "logistic",
"artattend_log_gamma_offset": -4,
"artattend": false,
"rng_seed": 17,
"no_of_samples": 20,
"max_iter": 250,
"psnu_level": null
},
"version": "<+version_info+>"
}
19 changes: 19 additions & 0 deletions inst/payload/spectrum_download_notes_payload.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"project_notes": {
"name": "My project 123",
"updated": "2022/05/17 12:34:21",
"note": "These are my project notes"
},
"version_notes": [
{
"name": "Version 2",
"updated": "2022/05/17 12:34:21",
"note": "Notes specific to this version"
},
{
"name": "Version 1",
"updated": "2022/05/14 09:12:54",
"note": "Notes from the first version"
}
]
}
83 changes: 83 additions & 0 deletions inst/payload/spectrum_download_state_payload.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"datasets": {
"pjnz":{
"path":"72A9B1F58AAA743ADA64C6AE985CF228.pjnz",
"filename":"demo_mwi2019.pjnz"
},
"population":{
"path":"651105353D7153381ED29363DF0D772F.csv",
"filename":"demo_population_agesex.csv"
},
"shape":{
"path":"EBE533976BFAF0CABCA2C2E1B611B9C7.geojson",
"filename":"demo_areas.geojson"
},
"survey":{
"path":"F669CA9AA38A3993B5A9E9D3EB717C7D.csv",
"filename":"demo_survey_hiv_indicators.csv"
},
"programme":{
"path":"8301300AB39BE177FA593571B9DD94C4.csv",
"filename":"demo_art_number.csv"
},
"anc":{
"path":"E6323AAEB045D31E4A267398F669CF20.csv",
"filename":"demo_anc_testing.csv"
}
},
"model_fit": {
"options": {
"area_scope": "MWI",
"area_level": 4,
"calendar_quarter_t1": "CY2016Q1",
"calendar_quarter_t2": "CY2018Q3",
"calendar_quarter_t3": "CY2019Q2",
"calendar_quarter_t4": "CY2022Q3",
"calendar_quarter_t5": "CY2023Q3",
"survey_prevalence": ["DEMO2016PHIA", "DEMO2015DHS"],
"survey_art_coverage": "DEMO2016PHIA",
"survey_recently_infected": "DEMO2016PHIA",
"include_art_t1": "true",
"include_art_t2": "true",
"anc_clients_year2": 2018,
"anc_clients_year2_num_months": "9",
"anc_prevalence_year1": 2016,
"anc_prevalence_year2": 2018,
"anc_art_coverage_year1": 2016,
"anc_art_coverage_year2": 2018,
"spectrum_population_calibration": "none",
"spectrum_plhiv_calibration_level": "none",
"spectrum_plhiv_calibration_strat": "sex_age_coarse",
"spectrum_artnum_calibration_level": "none",
"spectrum_artnum_calibration_strat": "sex_age_coarse",
"spectrum_infections_calibration_level": "none",
"spectrum_infections_calibration_strat": "sex_age_coarse",
"spectrum_aware_calibration_level": "none",
"spectrum_aware_calibration_strat": "sex_age_coarse",
"calibrate_method": "logistic",
"artattend_log_gamma_offset": -4,
"artattend": false,
"output_aware_plhiv": "true",
"rng_seed": 17,
"no_of_samples": 500,
"max_iter": 250,
"psnu_level": null
},
"id": "17d40b32f8e649349e047561a6831144"
},
"calibrate": {
"options": {
"spectrum_plhiv_calibration_level": "national",
"spectrum_plhiv_calibration_strat": "sex_age_group",
"spectrum_artnum_calibration_level": "national",
"spectrum_artnum_calibration_strat": "sex_age_coarse",
"spectrum_infections_calibration_level": "national",
"spectrum_infections_calibration_strat": "sex_age_coarse",
"spectrum_aware_calibration_level": "national",
"spectrum_aware_calibration_strat": "sex_age_coarse",
"calibrate_method": "logistic"
},
"id": "6e457f5a9f0413708624b7b0384e5fd0"
},
"version": "<+version_info+>"
}
11 changes: 11 additions & 0 deletions inst/payload/validate_anc_payload.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"type": "anc",
"file": {
"path": "testdata/anc.csv",
"hash": "12345",
"filename": "original.csv",
"fromADR": false,
"resource_url": "https://adr.unaids.org/file/123.csv"
},
"shape": "testdata/malawi.geojson"
}
5 changes: 5 additions & 0 deletions inst/payload/validate_baseline_payload.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"pjnz": "testdata/Malawi2019.PJNZ",
"shape": "testdata/malawi.geojson",
"population": "testdata/population.csv"
}
76 changes: 76 additions & 0 deletions inst/payload/validate_options_payload.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"data": {
"pjnz": {
"path": "testdata/Malawi2019.PJNZ",
"filename": "Malawi2019.PJNZ",
"hash": "12345",
"fromADR": false
},
"shape": {
"path": "testdata/malawi.geojson",
"filename": "malawi.geojson",
"hash": "12345",
"fromADR": false
},
"population": {
"path": "testdata/population.csv",
"filename": "population.csv",
"hash": "12345",
"fromADR": false
},
"survey": {
"path": "testdata/survey.csv",
"filename": "survey.csv",
"hash": "12345",
"fromADR": false
},
"programme": {
"path": "testdata/programme.csv",
"filename": "programme.csv",
"hash": "12345",
"fromADR": false
},
"anc": {
"path": "testdata/anc.csv",
"filename": "anc.csv",
"hash": "12345",
"fromADR": false
}
},
"options": {
"area_scope": "MWI",
"area_level": 4,
"calendar_quarter_t1": "CY2016Q1",
"calendar_quarter_t2": "CY2018Q3",
"calendar_quarter_t3": "CY2019Q2",
"calendar_quarter_t4": "CY2022Q3",
"calendar_quarter_t5": "CY2023Q3",
"survey_prevalence": ["DEMO2016PHIA", "DEMO2015DHS"],
"survey_art_coverage": "DEMO2016PHIA",
"survey_recently_infected": "DEMO2016PHIA",
"include_art_t1": "true",
"include_art_t2": "true",
"anc_clients_year2": 2018,
"anc_clients_year2_num_months": "9",
"anc_prevalence_year1": 2016,
"anc_prevalence_year2": 2018,
"anc_art_coverage_year1": 2016,
"anc_art_coverage_year2": 2018,
"spectrum_population_calibration": "none",
"spectrum_plhiv_calibration_level": "none",
"spectrum_plhiv_calibration_strat": "sex_age_group",
"spectrum_artnum_calibration_level": "none",
"spectrum_artnum_calibration_strat": "age_coarse",
"spectrum_aware_calibration_level": "none",
"spectrum_aware_calibration_strat": "age_coarse",
"spectrum_infections_calibration_level": "none",
"spectrum_infections_calibration_strat": "age_coarse",
"artattend_log_gamma_offset": -4,
"artattend": false,
"output_aware_plhiv": true,
"rng_seed": 17,
"no_of_samples": 20,
"max_iter": 250,
"psnu_level": null
}
}
10 changes: 10 additions & 0 deletions inst/payload/validate_pjnz_payload.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"type": "pjnz",
"file": {
"path": "testdata/Malawi2019.PJNZ",
"filename": "Malawi2019.PJNZ",
"hash": "12345",
"fromADR": false,
"resource_url": "https://adr.unaids.org/file/123.csv"
}
}
Loading

0 comments on commit cedd4a9

Please sign in to comment.