Closed mariam16548 closed 4 years ago
@paul-shannon Today's Progress Report:
Hi @paul-shannon,
You should be able to find my shiny app through this path:
covidProject/covidApp/covidSimpleCalculation.R
Let me know what you think!
@mariam16548 - very nice. The Evaluate button is redundant. Standard practice is to recalculate on changes to the slider.
@paul-shannon I'll remove the evaluate button!
Hi @paul-shannon - I've been trying to figure out how to use the sprintf() function to make the code more concise, but I'm having some trouble with it. I put up my code so you can see what I have so far (simpleCalculationVersion2.R). My approach involves making a function that uses sprintf(), but clearly I'm doing something wrong since I just end up with a blank, colorless box. Any advice is appreciated.
I’ll take a look right away.
On Aug 6, 2020, at 4:44 PM, mariam16548 notifications@github.com wrote:
Hi @paul-shannon - I've been trying to figure out how to use the sprintf() function to make the code more concise, but I'm having some trouble with it. I put up my code so you can see what I have so far (simpleCalculationVersion2.R). My approach involves making a function that uses sprintf(), but clearly I'm doing something wrong since I just end up with a blank, colorless box. Any advice is appreciated.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
@mariam16548 Along with DRY, it will serve you well to learn "Divide and Conquer" (by the way: Nice that you separated out a function - but still the function is called 5 times, repeating yourself!)
By divide and conquer, I mean: identify and isolate the kernel of the problem that is stopping you.
Here, it is confusion over using sprintf
So the thing to do is to work with sprintf
ALL BY ITSELF at the R console until you understand it.
Once you have that, let's discuss how to refactor your code so that it has no repeated text, and shrinks in size.
@paul-shannon Okay, I'll keep practicing with sprintf. I'll let you know if I figure something new out!
Understand the basic format:
sprintf(“fmt statment”, arg2, arg3, arg4, …, argN)
where each of the args corresponds to a type-specific “%” token in the “fmt” statement.
Is the meta-strategy clear? That is, work in the smallest possible context when you are learning something new
On Aug 6, 2020, at 4:59 PM, mariam16548 notifications@github.com wrote:
@paul-shannon Okay, I'll keep practicing with sprintf. I'll let you know if I figure something new out!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
@paul-shannon-- It is clear, thanks for your input! I just updated the code so you can see the changes I've made.
looking good! Now move those changes to covidSimpleCalculation.R and get rid of that version2.R distraction!
On Aug 6, 2020, at 5:26 PM, mariam16548 notifications@github.com wrote:
@paul-shannon-- It is clear, thanks for your input! I just updated the code so you can see the changes I've made.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
@paul-shannon Done!
Hi @paul-shannon, After looking through some links and statistics, I came up with a new calculation that includes a second slider input (I decided on the number of cases per 100,000 people specific to the county you live in). You should find the changes in the code.
@mariam16548 can you come up with other factors (other predictors) to put into the model? the uw fraternity hot spot suggests that alcohol reduces caution, leads to spread. many other ideas possible. and please look for data feeds: programmatic access to new infections, by county, by state. same for deaths.
https://www.cdc.gov/coronavirus/2019-ncov/cases-updates/about-epidemiology/index.html
@paul-shannon I'll look into this!
Hi @paul-shannon, After doing some research, here are some predictors I came up with:
I hope to add more as I continue to learn. I'll also keep looking for data feeds.
I hope you have a wonderful weekend!
@mariam16548 good work - enjoy the weekend!
Hi @paul-shannon, I put my code for the scatterplot in the covidProject repo in case you wanted to take a look at it.