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

[NM-72] Update test data, options and tests #538

Merged
merged 2 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: hintr
Title: R API for calling naomi district level HIV model
Version: 1.2.5
Version: 1.2.6
Authors@R:
person(given = "Robert",
family = "Ashton",
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# hintr 1.2.6

* Update test data and options to new Malawi 2024 data

# hintr 1.2.5

* Return metadata for input comparison table.
Expand Down
64 changes: 31 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ http://localhost:8888/validate/baseline-individual
"country": "Malawi",
"iso3": "MWI"
},
"filename": "Malawi2019.PJNZ",
"filename": "Malawi2024.PJNZ",
"fromADR": false,
"resource_url": "https://adr.unaids.org/file/123.csv",
"filters": null
Expand Down Expand Up @@ -261,8 +261,8 @@ Run a model
$ curl -s --data '{
"data": {
"pjnz": {
"path": "testdata/Malawi2019.PJNZ",
"filename": "Malawi2019.PJNZ",
"path": "testdata/Malawi2024.PJNZ",
"filename": "Malawi2024.PJNZ",
"hash": "12345",
"fromADR": false
},
Expand Down Expand Up @@ -300,23 +300,22 @@ $ curl -s --data '{
"options": {
"area_scope": "MWI",
"area_level": 4,
"calendar_quarter_t1": "CY2016Q1",
"calendar_quarter_t2": "CY2018Q3",
"calendar_quarter_t3": "CY2019Q2",
"survey_prevalence": [
"DEMO2016PHIA",
"DEMO2015DHS"
],
"survey_art_coverage": "DEMO2016PHIA",
"survey_recently_infected": "DEMO2016PHIA",
"calendar_quarter_t1": "CY2020Q3",
"calendar_quarter_t2": "CY2023Q4",
"calendar_quarter_t3": "CY2024Q3",
"calendar_quarter_t4": "CY2025Q3",
"calendar_quarter_t5": "CY2026Q3",
"survey_prevalence": "DEMO2020PHIA",
"survey_art_coverage": "DEMO2020PHIA",
"survey_recently_infected": "DEMO2020PHIA",
"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,
"anc_clients_year2": 2023,
"anc_clients_year2_num_months": "12",
"anc_prevalence_year1": 2020,
"anc_prevalence_year2": 2023,
"anc_art_coverage_year1": 2020,
"anc_art_coverage_year2": 2023,
"spectrum_population_calibration": "none",
"spectrum_plhiv_calibration_level": "none",
"spectrum_plhiv_calibration_strat": "sex_age_coarse",
Expand Down Expand Up @@ -540,23 +539,22 @@ $ curl -s --data '{
"options": {
"area_scope": "MWI",
"area_level": 4,
"calendar_quarter_t1": "CY2016Q1",
"calendar_quarter_t2": "CY2018Q3",
"calendar_quarter_t3": "CY2019Q2",
"survey_prevalence": [
"DEMO2016PHIA",
"DEMO2015DHS"
],
"survey_art_coverage": "DEMO2016PHIA",
"survey_recently_infected": "DEMO2016PHIA",
"calendar_quarter_t1": "CY2020Q3",
"calendar_quarter_t2": "CY2023Q4",
"calendar_quarter_t3": "CY2024Q3",
"calendar_quarter_t4": "CY2025Q3",
"calendar_quarter_t5": "CY2026Q3",
"survey_prevalence": "DEMO2020PHIA",
"survey_art_coverage": "DEMO2020PHIA",
"survey_recently_infected": "DEMO2020PHIA",
"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,
"anc_clients_year2": 2023,
"anc_clients_year2_num_months": "12",
"anc_prevalence_year1": 2020,
"anc_prevalence_year2": 2023,
"anc_art_coverage_year1": 2020,
"anc_art_coverage_year2": 2023,
"spectrum_population_calibration": "none",
"spectrum_plhiv_calibration_level": "none",
"spectrum_plhiv_calibration_strat": "sex_age_coarse",
Expand Down
10 changes: 5 additions & 5 deletions inst/payload/model_calibrate_payload.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"options": {
"spectrum_plhiv_calibration_level": "national",
"spectrum_plhiv_calibration_strat": "sex_age_group",
"spectrum_artnum_calibration_level": "national",
"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": "national",
"spectrum_infections_calibration_level": "none",
"spectrum_infections_calibration_strat": "sex_age_coarse",
"spectrum_aware_calibration_level": "national",
"spectrum_aware_calibration_level": "none",
"spectrum_aware_calibration_strat": "sex_age_coarse",
"calibrate_method": "logistic"
},
Expand Down
32 changes: 16 additions & 16 deletions inst/payload/model_submit_payload.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"data": {
"pjnz": {
"path": "testdata/Malawi2019.PJNZ",
"filename": "Malawi2019.PJNZ",
"path": "testdata/Malawi2024.PJNZ",
"filename": "Malawi2024.PJNZ",
"hash": "12345",
"fromADR": false,
"resource_url": null
Expand Down Expand Up @@ -46,22 +46,22 @@
"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",
"calendar_quarter_t1": "CY2020Q3",
"calendar_quarter_t2": "CY2023Q4",
"calendar_quarter_t3": "CY2024Q3",
"calendar_quarter_t4": "CY2025Q3",
"calendar_quarter_t5": "CY2026Q3",
"survey_prevalence": "DEMO2020PHIA",
"survey_art_coverage": "DEMO2020PHIA",
"survey_recently_infected": "DEMO2020PHIA",
"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,
"anc_clients_year2": 2023,
"anc_clients_year2_num_months": "12",
"anc_prevalence_year1": 2020,
"anc_prevalence_year2": 2023,
"anc_art_coverage_year1": 2020,
"anc_art_coverage_year2": 2023,
"spectrum_population_calibration": "none",
"spectrum_plhiv_calibration_level": "none",
"spectrum_plhiv_calibration_strat": "sex_age_coarse",
Expand Down
20 changes: 10 additions & 10 deletions inst/payload/model_submit_payload_minimal.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"data": {
"pjnz": {
"path": "testdata/Malawi2019.PJNZ",
"filename": "Malawi2019.PJNZ",
"path": "testdata/Malawi2024.PJNZ",
"filename": "Malawi2024.PJNZ",
"hash": "12345",
"fromADR": false
},
Expand All @@ -28,14 +28,14 @@
"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",
"calendar_quarter_t1": "CY2020Q3",
"calendar_quarter_t2": "CY2023Q4",
"calendar_quarter_t3": "CY2024Q3",
"calendar_quarter_t4": "CY2025Q3",
"calendar_quarter_t5": "CY2026Q3",
"survey_prevalence": "DEMO2020PHIA",
"survey_art_coverage": "DEMO2020PHIA",
"survey_recently_infected": "DEMO2020PHIA",
"spectrum_population_calibration": "none",
"spectrum_plhiv_calibration_level": "none",
"spectrum_plhiv_calibration_strat": "sex_age_group",
Expand Down
28 changes: 14 additions & 14 deletions inst/payload/spectrum_download_state_payload.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,22 @@
"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",
"calendar_quarter_t1": "CY2020Q3",
"calendar_quarter_t2": "CY2023Q4",
"calendar_quarter_t3": "CY2024Q3",
"calendar_quarter_t4": "CY2025Q3",
"calendar_quarter_t5": "CY2026Q3",
"survey_prevalence": "DEMO2020PHIA",
"survey_art_coverage": "DEMO2020PHIA",
"survey_recently_infected": "DEMO2020PHIA",
"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,
"anc_clients_year2": 2023,
"anc_clients_year2_num_months": "12",
"anc_prevalence_year1": 2020,
"anc_prevalence_year2": 2023,
"anc_art_coverage_year1": 2020,
"anc_art_coverage_year2": 2023,
"spectrum_population_calibration": "none",
"spectrum_plhiv_calibration_level": "none",
"spectrum_plhiv_calibration_strat": "sex_age_coarse",
Expand Down
2 changes: 1 addition & 1 deletion inst/payload/validate_baseline_payload.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"pjnz": "testdata/Malawi2019.PJNZ",
"pjnz": "testdata/Malawi2024.PJNZ",
"shape": "testdata/malawi.geojson",
"population": "testdata/population.csv"
}
32 changes: 16 additions & 16 deletions inst/payload/validate_options_payload.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"data": {
"pjnz": {
"path": "testdata/Malawi2019.PJNZ",
"filename": "Malawi2019.PJNZ",
"path": "testdata/Malawi2024.PJNZ",
"filename": "Malawi2024.PJNZ",
"hash": "12345",
"fromADR": false
},
Expand Down Expand Up @@ -40,22 +40,22 @@
"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",
"calendar_quarter_t1": "CY2020Q3",
"calendar_quarter_t2": "CY2023Q4",
"calendar_quarter_t3": "CY2024Q3",
"calendar_quarter_t4": "CY2025Q3",
"calendar_quarter_t5": "CY2026Q3",
"survey_prevalence": "DEMO2020PHIA",
"survey_art_coverage": "DEMO2020PHIA",
"survey_recently_infected": "DEMO2020PHIA",
"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,
"anc_clients_year2": 2023,
"anc_clients_year2_num_months": "12",
"anc_prevalence_year1": 2020,
"anc_prevalence_year2": 2023,
"anc_art_coverage_year1": 2020,
"anc_art_coverage_year2": 2023,
"spectrum_population_calibration": "none",
"spectrum_plhiv_calibration_level": "none",
"spectrum_plhiv_calibration_strat": "sex_age_group",
Expand Down
4 changes: 2 additions & 2 deletions inst/payload/validate_pjnz_payload.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"type": "pjnz",
"file": {
"path": "testdata/Malawi2019.PJNZ",
"filename": "Malawi2019.PJNZ",
"path": "testdata/Malawi2024.PJNZ",
"filename": "Malawi2024.PJNZ",
"hash": "12345",
"fromADR": false,
"resource_url": "https://adr.unaids.org/file/123.csv"
Expand Down
32 changes: 16 additions & 16 deletions scripts/download_payload.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"state": {
"datasets": {
"pjnz":{
"path":"Malawi2019.PJNZ",
"filename":"demo_mwi2019.pjnz"
"path":"Malawi2024.PJNZ",
"filename":"demo_mwi2024.pjnz"
},
"population":{
"path":"population.csv",
Expand All @@ -39,22 +39,22 @@
"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",
"calendar_quarter_t1": "CY2020Q3",
"calendar_quarter_t2": "CY2023Q4",
"calendar_quarter_t3": "CY2024Q3",
"calendar_quarter_t4": "CY2025Q3",
"calendar_quarter_t5": "CY2026Q3",
"survey_prevalence": "DEMO2020PHIA",
"survey_art_coverage": "DEMO2020PHIA",
"survey_recently_infected": "DEMO2020PHIA",
"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,
"anc_clients_year2": 2023,
"anc_clients_year2_num_months": "12",
"anc_prevalence_year1": 2020,
"anc_prevalence_year2": 2023,
"anc_art_coverage_year1": 2020,
"anc_art_coverage_year2": 2023,
"spectrum_population_calibration": "none",
"spectrum_plhiv_calibration_level": "none",
"spectrum_plhiv_calibration_strat": "sex_age_coarse",
Expand Down
Loading
Loading