Description Usage Arguments Value Examples
Up until now, each row is an article with keywords stored
as a nested dataframe. Unnesting keywords makes it easier
to wrangle those values. This function also writes out
a file of keyword values to be used as input to the
lookup table shiny app and creates a folder for replacements.
After running this function, run nyt_run_example("lookup_table_app")
.
Upload the file in the "values_input_folder". Place the
output in the folder "values_output_folder".
1 2 3 4 5 6 | nyt_unnest_df(
nested_df,
max_keyword_length = 200,
values_input_folder = "values_lookup_input",
values_output_folder = "renamed_values"
)
|
nested_df |
output from |
max_keyword_length |
somewhat arbitrarily set to 200 for long strings that aren't really keywords |
values_input_folder |
folder name to write keyword values pre-cleaning |
values_output_folder |
folder to find keyword values post-cleaning |
unnested data frame where each row is a keyword in an article instead of each row being an article
1 2 3 4 | ## Not run:
unnested_df <- nyt_unnest_df(nested_df)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.