From 7e891c1603aadf9a7442c9d781fa10613b24df9d Mon Sep 17 00:00:00 2001 From: Norm Rasmussen Date: Wed, 8 Mar 2023 20:49:38 -0500 Subject: [PATCH] A few notes changes --- .../GoogleScripts/Spark_Searches/.clasp.json | 1 + Scripts/GoogleScripts/Spark_Searches/README.md | 18 ++++++++++++++++++ Scripts/GoogleScripts/Spark_Searches/Words.js | 11 +++++++++++ .../Spark_Searches/appsscript.json | 7 +++++++ 4 files changed, 37 insertions(+) create mode 100644 Scripts/GoogleScripts/Spark_Searches/.clasp.json create mode 100644 Scripts/GoogleScripts/Spark_Searches/README.md create mode 100644 Scripts/GoogleScripts/Spark_Searches/Words.js create mode 100644 Scripts/GoogleScripts/Spark_Searches/appsscript.json diff --git a/Scripts/GoogleScripts/Spark_Searches/.clasp.json b/Scripts/GoogleScripts/Spark_Searches/.clasp.json new file mode 100644 index 00000000..5f226d23 --- /dev/null +++ b/Scripts/GoogleScripts/Spark_Searches/.clasp.json @@ -0,0 +1 @@ +{"scriptId":"1MKnp8LwiUqKNo_uVxDVQ5EeSmgH7UFMAEoQbuZhWfpP_eH-JcxixIvc4","rootDir":"/Users/normrasmussen/Documents/Work/Scripts/GoogleScripts/Spark_Searches"} diff --git a/Scripts/GoogleScripts/Spark_Searches/README.md b/Scripts/GoogleScripts/Spark_Searches/README.md new file mode 100644 index 00000000..062453ca --- /dev/null +++ b/Scripts/GoogleScripts/Spark_Searches/README.md @@ -0,0 +1,18 @@ +# Formulas for Sheet + +The original Google Sheet: "https://docs.google.com/spreadsheets/d/1l8zbWulK_sgWZcrje02cazZo2OEJy59Cw9sYA0p3-Sk/edit#gid=2067280028" + +List of Formulas you will need along with the sheet and Cell: + +| Sheet | Cell | Formula| +|------|------|------| +| 4 (Formulas) | A2 | =WORDS(FullData!B2:B5000) | +| 4 (Formulas) | B2 | =ArrayFormula(IFNA(regexextract(A:A, "^\w{1,2}$"),)) | +| 4 (Formulas) | C2 | =ArrayFormula(IFNA(regexextract(A:A, "^\w{3,4}$"),)) | +| 4 (Formulas) | D2 | =ArrayFormula(IFNA(regexextract(A:A, "^\w{5,20}$"),)) | +| 3 (Analysis) | A3 | =unique(filter(flatten(Formulas!B3:B), len(flatten(Formulas!B3:B)))) | +| 3 (Analysis) | B3 | =COUNTA(IFNA(FILTER(FullData!B2:B, REGEXMATCH(FullData!B2:B, "(?i)"&A3&"(?-i)")))) | +| 3 (Analysis) | D3 | =unique(filter(flatten(Formulas!C3:C), len(flatten(Formulas!C3:C)))) | +| 3 (Analysis) | E3 | =COUNTA(IFNA(FILTER(FullData!$B$2:$B$5000, REGEXMATCH(FullData!$B$2:$B$5000, "(?i)"&D3&"(?-i)")))) | +| 3 (Analysis) | G3 | =unique(filter(flatten(Formulas!D3:D), len(flatten(Formulas!D3:D)))) | +| 3 (Analysis) | H3 | =COUNTA(IFNA(FILTER(FullData!$B$2:$B$5000, REGEXMATCH(FullData!$B$2:$B$5000, "(?i)"&G3&"(?-i)")))) | diff --git a/Scripts/GoogleScripts/Spark_Searches/Words.js b/Scripts/GoogleScripts/Spark_Searches/Words.js new file mode 100644 index 00000000..9579bff0 --- /dev/null +++ b/Scripts/GoogleScripts/Spark_Searches/Words.js @@ -0,0 +1,11 @@ +function WORDS(input) { + var input = input.toString(); + var inputSplit = input.split(" "); + Logger.log(inputSplit); + inputSplit = inputSplit.toString(); + + var punctuationless = inputSplit.replace(/[.,\/"#!$%\?^&\*;:{}=\-_`~()]/g," "); + var finalString = punctuationless.replace(/\s{1,5}/g," "); + finalString = finalString.toLowerCase(); + return finalString.split(" "); +} \ No newline at end of file diff --git a/Scripts/GoogleScripts/Spark_Searches/appsscript.json b/Scripts/GoogleScripts/Spark_Searches/appsscript.json new file mode 100644 index 00000000..3cf1d247 --- /dev/null +++ b/Scripts/GoogleScripts/Spark_Searches/appsscript.json @@ -0,0 +1,7 @@ +{ + "timeZone": "America/New_York", + "dependencies": { + }, + "exceptionLogging": "STACKDRIVER", + "runtimeVersion": "V8" +} \ No newline at end of file