Hello! I hope eveyrone is good here. I am new to ObservableHQ, so please bear with me. I am trying to visualise my dataset word frequency with d3/word-cloud
I have a folder full of dataset text files, how can I write code to take all the words from all text files that have the term Georgia in it?
I’ve searched and there dont seem to be a method in Observable to do this:
For instance
Georgia_closeup_beauty_0035.txt
Georgia_closeup_fashion_0027.txt
I have this code
const filenames = [
“GeorgiaPalmer_file1.txt”,
“GeorgiaPalmer_file2.txt”,
// Add more filenames as needed
];
// Use Promise.all to read all the files that contain “GeorgiaPalmer” in their filename
Promise.all(filenames.map(filename => FileAttachment(filename).text()))
.then(files => {
// Process the files as needed
// …
});
How can tell the script to use all files with the term Georgia in the filenaem