Open Niagara1000 opened 4 years ago
It should demonstrate a useful task more so than a package or function.
If you want to do X, you can do so as follows...
Which typically requires that you introduce a function or package for the task.
It totally depends on the task. Sometimes it's just explaining how an external API works - what sorts of arguments you need, how the data is returned, and how you might convert it to a regular data frame (just making up an example here).
In this case, though, you could do this entirely with common R functions. The goal is not to highlight the functions, but rather the recipe for the task - the order of things and importance of specific arguments. Preview the format of data returned. Etc.
Does that help?
Kind of. Still confused as to what would be a valid task. Can you give another example so that I can come up with my own example from it?
Try thinking in terms of pseudocode and find something that involves 3-5 steps.
The basic Lab 06 task of converting a shapefile to a Dorling cartogram, for example, requires:
(1) Downloading data / shapefile from the Census. (2) Converting the shapefile to the SP format. (3) Using the Dorling package to convert the regular shapefile to a Dorling shapefile.
The devil is always in the details. You might have to google around about map projections in this example to find the proper argument.
But it meets the requirement that you are teaching your classmates something new that they can do with R, and explaining the process.
The important part of the assignment is changing your role from student to instructor. When you are a student you just have to submit code that works.
When you are a project lead on a team you might be teaching junior analysts how to do tasks by creating manuals for working with data and packages. You need to break down tasks, explain the "recipe" using pseudocode, introduce packages, explain the arguments used in the functions, preview data returned from wrangling steps.
So part of it is an opportunity to pick a topic that interests you and figure out how to do something new in R.
But another important part is learning how to create reproducible examples and documenting the process to build capacity in teams or organizations.
Ok, thank you Dr. @lecy . Would the package monkeylearn
be acceptable? What about the stringr
package?
Both are great. Just make sure you pick a task or a set of functions with a reasonable scope. I.e. don't try to do too much (both packages are quite expansive).
Hi Dr. @lecy ,
Yesterday, I decided to do my code-through on stringr
after we spoke. You also mentioned that stringr
has some date functions. I have been looking around for what that might be, but had no luck so far. I was wondering if you meant to say stringr
or another package. I see that there are other packages specifically for dates like lubridate
and date
. Did you mean to mention those packages instead of stringr
or is there a date function within stringr
that I just haven't found yet?
Thank you, Archana
You are right. I was thinking of the lubridate package. They are all part of the "tidyverse" packages.
Hi Dr. @lecy ,
For the code-through assignment, can we choose any R function that we have not yet used in our class or does our code-through have to be about an R package?
Thank you!