Skip to content

I40 defaultdatareformatting localchanges#41

Open
solveigvandervegt wants to merge 8 commits into
masterfrom
i40-defaultdatareformatting-localchanges
Open

I40 defaultdatareformatting localchanges#41
solveigvandervegt wants to merge 8 commits into
masterfrom
i40-defaultdatareformatting-localchanges

Conversation

@solveigvandervegt

Copy link
Copy Markdown
Contributor

Created the function create_excel(country) which takes a specific country for the input and creates a country-specific excel sheet from the template file. It returns the name of the new excel file so it can be processed the same as now. I tested that this function works as desired on my laptop but I haven't put it into any CoMo code (mainly cause I couldn't find any code to put it into).

Documentation of data sets was updated as well.

Sumali helpfully pointed out that I had it switched, and that in the data tables, contrary to in the heatmaps, the rows are individuals and that columns represent their contacts. This has now been corrected in the documentation.
Wrote a function (create_excel) that takes an excel template (Template_CoMo_CountryData_temp.xlsx), edits it to be country-specific and then saves it as a new excel file. The name of the new excel file is returned so the file can be processed as it is now.

Documentation of the data sets cases, population, country_demog is added. mort_sever_data is standard across countries and thus already in the excel template. age_categories is not required, but I do not know how to delete mort_sever_data and age_categories from the data_CoMo.RData file.
Forgot to add line with data files to last three additions to data documentation
to specify that this package is required for running the model (particularly you need it for the create_excel())
Instead of requiring and loading XLConnect within the function, now XLConnect:: is used to call the specific functions from this package. Hopefully this will fix the issues in testing.
the excel templates were moved to a new inst/extdata folder. The country-specific excel sheet is also saved to this folder as excel data appearantly needs to be kept separate from R data. I foresee some problems with this as the internet says that during installation of the package, folders within inst are copied into the main folder, in which case the function is directing to the wrong folder as it specifically directs to inst/extdata. If this does turn out to be a problem, there will be another commit fixing this :)
@solveigvandervegt

Copy link
Copy Markdown
Contributor Author

I seem to have gotten all the tests to pass now @ben18785
Let me know what you think!

@cosmicnet

Copy link
Copy Markdown

@solveigvandervegt I could be wrong, but I don't think you intended to add the file R/Untitled.RData to your branch.

@solveigvandervegt

Copy link
Copy Markdown
Contributor Author

@cosmicnet Tbh I haven't looked at this in months so not entirely sure how it got there or why I put it there but looking at it quickly, I don't think anything will immediately break if you want to delete it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants