-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathComplete-Repository-Optimization.ps1
More file actions
1502 lines (1137 loc) · 45.3 KB
/
Complete-Repository-Optimization.ps1
File metadata and controls
1502 lines (1137 loc) · 45.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# ============================================================================
# COMPLETE REPOSITORY OPTIMIZATION SCRIPT
# ============================================================================
# This ONE script does EVERYTHING: directories, media, and all documentation
# Version: 2.0 Complete Automation
# ============================================================================
param(
[string]$RepoOwner = "JulietMirambo",
[string]$RepoName = "Units_of_Measure_Harmonization-intelligence-platform",
[string]$DashboardGifPath = "C:\Users\Julie.Mirambo\Desktop\UOM intelligence VISUAL DASHBOARD RESULTS DISPLAY",
[string]$WorkflowScreenshotPath = "C:\Users\Julie.Mirambo\Videos\Captures\KNIME WORKFLOW SCREENSHOT",
[string]$YourEmail = "juliet.mirambo@example.com",
[string]$YourLinkedIn = "julietmirambo"
)
$ErrorActionPreference = "Continue"
# ============================================================================
# BANNER
# ============================================================================
Clear-Host
Write-Host ""
Write-Host "====================================================================" -ForegroundColor Cyan
Write-Host " COMPLETE REPOSITORY OPTIMIZATION - AUTOMATED" -ForegroundColor Cyan
Write-Host " One script to rule them all!" -ForegroundColor Cyan
Write-Host "====================================================================" -ForegroundColor Cyan
Write-Host ""
Write-Host "Repository: $RepoOwner/$RepoName" -ForegroundColor Gray
Write-Host "Working Directory: $(Get-Location)" -ForegroundColor Gray
Write-Host ""
$confirm = Read-Host "This will create/overwrite multiple files. Continue? (Y/N)"
if ($confirm -ne "Y" -and $confirm -ne "y") {
Write-Host "Operation cancelled" -ForegroundColor Red
exit
}
Write-Host ""
Write-Host "Starting complete automation..." -ForegroundColor Green
Write-Host ""
# ============================================================================
# STEP 1: CREATE ALL DIRECTORIES
# ============================================================================
Write-Host "STEP 1: Creating Directory Structure" -ForegroundColor Cyan
Write-Host "=====================================" -ForegroundColor Cyan
$directories = @(
"docs",
"docs\images",
"examples",
".github",
".github\ISSUE_TEMPLATE",
".github\workflows"
)
foreach ($dir in $directories) {
if (-not (Test-Path $dir)) {
New-Item -ItemType Directory -Path $dir -Force | Out-Null
Write-Host " [+] Created: $dir" -ForegroundColor Green
} else {
Write-Host " [OK] Exists: $dir" -ForegroundColor Gray
}
}
Write-Host ""
# ============================================================================
# STEP 2: COPY MEDIA FILES
# ============================================================================
Write-Host "STEP 2: Copying Media Files" -ForegroundColor Cyan
Write-Host "============================" -ForegroundColor Cyan
# Function to find and copy media
function Copy-MediaFile {
param($SearchPaths, $Destination, $Extensions, $Name)
Write-Host " Searching for $Name..." -ForegroundColor Yellow
foreach ($path in $SearchPaths) {
# Check if it's a direct file
if (Test-Path $path -PathType Leaf) {
Copy-Item -Path $path -Destination $Destination -Force
$size = (Get-Item $Destination).Length / 1MB
Write-Host " [SUCCESS] $Name copied!" -ForegroundColor Green
Write-Host " Source: $path" -ForegroundColor Gray
Write-Host " Size: $([math]::Round($size, 2)) MB" -ForegroundColor Gray
return $true
}
# Check if it's a directory
if (Test-Path $path -PathType Container) {
foreach ($ext in $Extensions) {
$files = Get-ChildItem -Path $path -Filter "*$ext" -File -ErrorAction SilentlyContinue
if ($files) {
$firstFile = $files[0]
Copy-Item -Path $firstFile.FullName -Destination $Destination -Force
$size = (Get-Item $Destination).Length / 1MB
Write-Host " [SUCCESS] $Name copied!" -ForegroundColor Green
Write-Host " Source: $($firstFile.FullName)" -ForegroundColor Gray
Write-Host " Size: $([math]::Round($size, 2)) MB" -ForegroundColor Gray
return $true
}
}
}
# Try with extension appended
foreach ($ext in $Extensions) {
$pathWithExt = "$path$ext"
if (Test-Path $pathWithExt -PathType Leaf) {
Copy-Item -Path $pathWithExt -Destination $Destination -Force
$size = (Get-Item $Destination).Length / 1MB
Write-Host " [SUCCESS] $Name copied!" -ForegroundColor Green
Write-Host " Source: $pathWithExt" -ForegroundColor Gray
Write-Host " Size: $([math]::Round($size, 2)) MB" -ForegroundColor Gray
return $true
}
}
}
Write-Host " [WARNING] $Name not found" -ForegroundColor Yellow
Write-Host " Searched: $($SearchPaths -join ', ')" -ForegroundColor Gray
return $false
}
# Copy Dashboard GIF
$dashboardPaths = @(
$DashboardGifPath,
"$DashboardGifPath.gif",
"C:\Users\Julie.Mirambo\Desktop\UOM intelligence VISUAL DASHBOARD RESULTS DISPLAY",
"C:\Users\Julie.Mirambo\Desktop"
)
$gifCopied = Copy-MediaFile -SearchPaths $dashboardPaths -Destination "docs\images\dashboard-demo.gif" -Extensions @(".gif", ".mp4") -Name "Dashboard GIF"
Write-Host ""
# Copy Workflow Screenshot
$screenshotPaths = @(
$WorkflowScreenshotPath,
"$WorkflowScreenshotPath.png",
"C:\Users\Julie.Mirambo\Videos\Captures\KNIME WORKFLOW SCREENSHOT",
"C:\Users\Julie.Mirambo\Videos\Captures"
)
$screenshotCopied = Copy-MediaFile -SearchPaths $screenshotPaths -Destination "docs\images\workflow-architecture.png" -Extensions @(".png", ".jpg", ".jpeg") -Name "Workflow Screenshot"
Write-Host ""
# ============================================================================
# STEP 3: CREATE ALL DOCUMENTATION FILES
# ============================================================================
Write-Host "STEP 3: Creating Documentation Files" -ForegroundColor Cyan
Write-Host "=====================================" -ForegroundColor Cyan
Write-Host ""
# ----------------------------------------------------------------------------
# README.md - ENHANCED VERSION
# ----------------------------------------------------------------------------
Write-Host " Creating README.md..." -ForegroundColor Yellow
$dashboardSection = if ($gifCopied) {
@"
<div align="center">

*Real-time visual dashboard showing UOM error detection, classification, and correction in action*
</div>
"@
} else {
@"
<div align="center">
<!-- ADD YOUR DASHBOARD GIF HERE -->
<!-- Copy your GIF to: docs/images/dashboard-demo.gif -->
**Visual Dashboard Demo Coming Soon!**
*Interactive dashboard showing real-time error detection and correction*
</div>
"@
}
$workflowSection = if ($screenshotCopied) {
@"
### System Architecture
<div align="center">

*Complete KNIME workflow showing data pipeline, ML engine, and automation components*
</div>
"@
} else {
@"
### System Architecture
<!-- Screenshot placeholder - add your workflow image to docs/images/workflow-architecture.png -->
**[View Architecture Details](docs/ARCHITECTURE.md)**
"@
}
$readmeContent = @"
<div align="center">
# Units of Measure Harmonization Intelligence Platform
### Production-Grade ML System for Automated UOM Error Detection
[](https://opensource.org/licenses/MIT)
[](https://github.com/$RepoOwner/$RepoName/releases)
[](https://github.com/$RepoOwner/$RepoName/stargazers)
[](https://github.com/$RepoOwner/$RepoName/network)
[](https://www.knime.com/)
[](CONTRIBUTING.md)
**88-92% Accuracy** | **94% Autonomy** | **3,300 Records/min** | **95%+ Success Rate**
[Quick Start](#quick-start) | [Demo](#see-it-in-action) | [Features](#key-features) | [Docs](#documentation) | [Contribute](#contributing)
</div>
---
## The Million-Dollar Problem
**Manufacturing and procurement organizations lose millions annually** due to Unit of Measure (UOM) errors.
A single misplaced decimal or wrong unit causes:
- Order fulfillment disasters (50kg vs 50lbs)
- Inventory chaos (overstocking/understocking)
- Supply chain disruptions (wrong quantities shipped)
- Financial losses (incorrect billing, waste)
- Compliance issues (regulatory violations)
**Traditional manual review**: 70% accuracy, 500 records/hour, 40% autonomy
**This platform**: 88-92% accuracy, 3,300 records/min, 94% autonomy
**This platform stops the bleeding.**
---
## The Solution
An intelligent **KNIME-powered ML system** that automatically detects and corrects UOM errors with enterprise-grade accuracy.
Built on proven machine learning and physics-based validation, this platform transforms error-prone manual processes into automated, reliable data quality assurance.
---
## See It In Action
$dashboardSection
### Dashboard Features
The **interactive visual dashboard** provides:
- Real-time error detection - See UOM issues as they're identified
- Confidence scoring - ML probability (0-100%)
- Auto-correction tracking - Watch the system fix errors
- Root cause analytics - Understand WHY errors occur
- Intuitive visualizations - Color-coded, charts, statistics
- Performance metrics - Speed, accuracy, autonomy
**Built into the KNIME workflow** - zero additional setup needed!
**[Full Dashboard Guide](docs/dashboard-guide.md)**
---
$workflowSection
### Key Components
- **Data Ingestion** - CSV/Excel with validation
- **ML Classification Engine** - 60+ features, XGBoost
- **Physics Validation** - NIST-compliant conversion rules
- **Reinforcement Learning** - Q-learning autonomy agent
- **Interactive Dashboard** - Real-time visualization
**[Detailed Architecture](docs/ARCHITECTURE.md)**
---
## Quick Start
**Get running in under 5 minutes:**
``````bash
# 1. Clone repository
git clone https://github.com/$RepoOwner/$RepoName.git
cd $RepoName
# 2. Import into KNIME Analytics Platform (4.5+)
# File -> Import KNIME Workflow -> Select 'workflow' folder
# 3. Execute with sample data
# Right-click workflow -> Execute -> Select data-sample/sample_10k.csv
# Results in 2-3 minutes!
``````
**[Detailed Installation Guide](docs/INSTALLATION.md)**
---
## Key Features
### Performance Metrics
| Metric | Value | vs Manual | Improvement |
|--------|-------|-----------|-------------|
| **Accuracy** | 88-92% | ~70% | **+26%** |
| **Autonomy** | 94% | ~40% | **+135%** |
| **Speed** | 3,300/min | ~500/min | **+560%** |
| **Success Rate** | 95%+ | ~80% | **+19%** |
### Technology Stack
- **ML Engine**: 60+ engineered features, XGBoost classifier, 5-fold cross-validation
- **Processing**: 3,300 records per minute throughput
- **Validation**: NIST-compliant physics-based conversion engine
- **Autonomy**: Q-learning reinforcement learning agent (94% automation)
- **Dashboard**: Interactive JavaScript visualization with real-time updates
- **Platform**: KNIME Analytics 4.5+
### What Makes This Special
- **Visual Intelligence**: Watch errors being caught and corrected in real-time
- **Enterprise-Ready**: Handles millions of records with consistent performance
- **Self-Learning**: ML model improves accuracy over time with feedback
- **Zero Configuration**: Works out of the box with sensible defaults
- **Production-Tested**: Battle-hardened on real manufacturing data
- **Open Source**: Free for commercial use under MIT license
---
## Usage
### Basic Workflow
1. **Import your data** (CSV/Excel with UOM column)
2. **Execute the workflow** (one-click execution)
3. **View results** in the interactive dashboard
4. **Export corrections** to apply to your system
### Example Results
``````
Input: "50 KG" (should be "50 EA")
Output: Detected | Corrected | Confidence: 94%
Processing: 10,000 records
Time: 3 minutes
Errors Found: 847 (8.47%)
Auto-Corrected: 796 (94%)
Manual Review: 51 (6%)
``````
### Supported Formats
- CSV files (UTF-8, any delimiter)
- Excel files (.xlsx, .xls)
- Tab-separated values
- Pipe-delimited files
### Error Types Detected
- **Decimal Errors** - 50.0 vs 50 EA
- **Unit Mismatches** - KG vs EA, LBS vs KG
- **Conversion Issues** - Imperial/Metric confusion
- **Format Problems** - Spacing, capitalization
- **Missing Units** - Blank or null UOM fields
**[More Examples & Use Cases](examples/)**
---
## Documentation
### Getting Started
- [Installation Guide](docs/INSTALLATION.md) - Setup in 5 minutes
- [Quick Start Tutorial](docs/QUICK_START.md) - Your first workflow
- [Dashboard Guide](docs/dashboard-guide.md) - Using the visual interface
### In-Depth Guides
- [User Manual](docs/USER_GUIDE.md) - Complete feature guide
- [Architecture](docs/ARCHITECTURE.md) - System design deep-dive
- [ML Model Details](docs/ML_MODEL.md) - How the AI works
- [Customization](docs/CUSTOMIZATION.md) - Adapt to your needs
### Support
- [FAQ](docs/FAQ.md) - Frequently asked questions
- [Troubleshooting](docs/TROUBLESHOOTING.md) - Fix common issues
- [Roadmap](docs/ROADMAP.md) - Future plans
- [Changelog](CHANGELOG.md) - Version history
---
## Use Cases
This platform solves UOM problems across industries:
### Manufacturing
- **Production Planning** - Prevent material ordering errors
- **Inventory Management** - Clean SKU master data
- **Bill of Materials** - Standardize component units
### Supply Chain
- **Order Fulfillment** - Fix quantity discrepancies
- **Demand Forecasting** - Ensure data consistency
- **Multi-vendor Integration** - Harmonize supplier data
### Procurement
- **Purchase Orders** - Validate unit specifications
- **Contract Management** - Standardize terms
- **Spend Analysis** - Accurate cost calculations
### Data Quality
- **Data Migration** - Clean legacy systems
- **Healthcare** - Standardize medical units
- **Research** - Ensure measurement accuracy
**ROI**: Organizations report:
- 60-80% reduction in UOM errors
- 50%+ time savings on data quality tasks
- 90%+ reduction in order fulfillment issues
- Significant cost savings (millions in prevented losses)
---
## Contributing
We love contributions! This project thrives on community input.
### Ways to Contribute
- [Report Bugs](https://github.com/$RepoOwner/$RepoName/issues/new?template=bug_report.md)
- [Request Features](https://github.com/$RepoOwner/$RepoName/issues/new?template=feature_request.md)
- Submit Pull Requests
- Improve Documentation
- Star the Repository
- Share Your Success Story
- Join [Discussions](https://github.com/$RepoOwner/$RepoName/discussions)
**[Contributing Guide](CONTRIBUTING.md)**
---
## License
MIT License - **Free for commercial use!**
This means you can:
- Use commercially without restrictions
- Modify and distribute freely
- Use privately in your organization
- Sublicense as needed
**[Full License Text](LICENSE)**
---
## Recognition & Citation
If you use this in your research or product:
### Academic Citation
``````bibtex
@software{mirambo2025uom,
author = {Mirambo, Juliet Bosibori},
title = {Units of Measure Harmonization Intelligence Platform},
year = {2025},
publisher = {GitHub},
url = {https://github.com/$RepoOwner/$RepoName}
}
``````
**[Download Citation File](CITATION.cff)**
---
## Support This Project
**If this project saved you time or money:**
### Free Ways to Support
- Star this repository
- Fork and customize it
- Share with colleagues and on social media
- Engage in discussions and issues
- Improve documentation
- Report bugs
### Financial Support
- [GitHub Sponsors](https://github.com/sponsors/$RepoOwner)
- [Buy me a coffee](https://ko-fi.com/$RepoOwner)
- [Hire me for consulting](mailto:$YourEmail)
Every star and contribution helps make this project better!
---
## Contact & Support
### Get Help
- [GitHub Discussions](https://github.com/$RepoOwner/$RepoName/discussions) - Community Q&A
- [Issue Tracker](https://github.com/$RepoOwner/$RepoName/issues) - Bug reports & features
- Email: $YourEmail
- LinkedIn: [linkedin.com/in/$YourLinkedIn](https://linkedin.com/in/$YourLinkedIn)
### Stay Updated
- **Watch** this repo for updates
- **Star** to bookmark
- [Subscribe to releases](https://github.com/$RepoOwner/$RepoName/releases)
---
## Project Stats






---
## Roadmap
### Current Version (v1.0)
- ML-powered error detection
- Interactive dashboard
- KNIME workflow automation
- Sample datasets
### Upcoming Features
- API endpoint for integration
- Multi-language support
- Mobile dashboard
- Advanced RL algorithms
- Cloud deployment options
**[View Full Roadmap](docs/ROADMAP.md)**
---
<div align="center">
**Made with love by [Juliet Bosibori Mirambo](https://github.com/$RepoOwner)**
[](https://github.com/$RepoOwner)
**[Back to Top](#units-of-measure-harmonization-intelligence-platform)**
---
*Star this repo to stay updated!* | *Fork to customize for your needs!* | *Share with your network!*
**Repository Topics:** machine-learning | data-quality | knime | automation | manufacturing | supply-chain | data-cleaning | unit-conversion | artificial-intelligence | production-ready
</div>
"@
$readmeContent | Out-File -FilePath "README.md" -Encoding UTF8 -Force
Write-Host " [+] README.md created" -ForegroundColor Green
# ----------------------------------------------------------------------------
# INSTALLATION.md
# ----------------------------------------------------------------------------
Write-Host " Creating docs/INSTALLATION.md..." -ForegroundColor Yellow
$installationContent = @"
# Installation Guide
Complete setup instructions for the UOM Harmonization Intelligence Platform.
## Prerequisites
### Required Software
#### KNIME Analytics Platform (Required)
- **Version**: 4.5 or higher
- **Download**: https://www.knime.com/downloads
- **System Requirements**: 64-bit OS, Java 11+ (included)
#### Hardware Requirements
**Minimum:**
- CPU: Dual-core 2.0 GHz
- RAM: 8 GB
- Storage: 5 GB free space
**Recommended:**
- CPU: Quad-core 3.0 GHz or better
- RAM: 16 GB or more
- Storage: 20 GB free space (SSD preferred)
---
## Installation Steps
### Step 1: Install KNIME Analytics Platform
#### Windows
1. Download KNIME installer from https://www.knime.com/downloads
2. Run the .exe installer
3. Follow the installation wizard (accept defaults)
4. Launch KNIME from Start Menu
#### macOS
1. Download KNIME .dmg file
2. Open the DMG and drag KNIME to Applications
3. Launch KNIME from Applications
#### Linux
1. Download KNIME .tar.gz file
2. Extract: ``tar -xzf knime_*.tar.gz``
3. Navigate to extracted folder
4. Run: ``./knime``
### Step 2: Configure KNIME (First Launch)
1. **Workspace Setup**
- Choose or create a workspace directory
- Recommended: Documents/KNIME-workspace
2. **Memory Configuration** (Important!)
``````
Edit -> Preferences -> General -> Memory
- Set Maximum Heap Size: 8192 MB (or 50-70% of total RAM)
- Set Maximum Direct Buffer: 2048 MB
``````
3. **JavaScript View Settings**
``````
Edit -> Preferences -> JavaScript Views
- Enable JavaScript execution
- Enable local file access (for dashboard)
``````
### Step 3: Clone the Repository
#### Option A: Using Git (Recommended)
``````bash
# Clone via HTTPS
git clone https://github.com/$RepoOwner/$RepoName.git
# Navigate into directory
cd $RepoName
``````
#### Option B: Download ZIP
1. Go to https://github.com/$RepoOwner/$RepoName
2. Click green "Code" button -> Download ZIP
3. Extract ZIP to desired location
### Step 4: Import Workflow into KNIME
1. **Open KNIME Analytics Platform**
2. **Import Workflow**
- File -> Import KNIME Workflow...
- Select "Import from archive or folder"
- Click "Browse" button
3. **Select Workflow Directory**
- Navigate to your cloned/extracted repository
- Select the ``workflow`` folder
- Click "Select Folder"
4. **Import Options**
- Keep default settings
- Click "Finish"
5. **Wait for Import**
- KNIME will import the workflow
- If prompted, install missing extensions (auto-install recommended)
---
## Verification
### Test the Installation
1. **Locate the Workflow**
- In KNIME Explorer panel (left side)
- Find "Units_of_Measure_Harmonization-intelligence-platform"
2. **Open the Workflow**
- Double-click to open
3. **Configure Sample Data**
- Right-click "CSV Reader" node
- Configure -> Browse to ``data-sample/sample_10k.csv``
- Click OK
4. **Execute Test Run**
- Right-click workflow root
- Select "Execute All"
- Wait 2-3 minutes
5. **View Results**
- Right-click "Visual Dashboard" node
- Select "Open View"
- Dashboard should appear
### Expected Output
**Success Indicators:**
- All nodes show green traffic lights
- Console shows no red error messages
- Dashboard opens and displays statistics
- Results table populated with data
---
## Troubleshooting
### Common Issues
#### Issue 1: "Cannot find workflow"
**Solutions:**
- Ensure you selected the ``workflow`` folder, not repository root
- Check that folder contains ``workflow.knime`` file
#### Issue 2: "Missing extensions"
**Solutions:**
- Click "Install" when prompted
- Restart KNIME after installation
#### Issue 3: "Out of memory" errors
**Solutions:**
1. Close KNIME
2. Find knime.ini file:
- Windows: C:\Program Files\KNIME\knime.ini
- macOS: /Applications/KNIME.app/Contents/Eclipse/knime.ini
3. Edit and change: ``-Xmx8g`` (for 8GB heap)
4. Save and restart KNIME
#### Issue 4: Dashboard not displaying
**Solutions:**
- Enable JavaScript: Edit -> Preferences -> JavaScript Views
- Clear KNIME cache: File -> Preferences -> Advanced -> Clear Cache
- Re-execute the workflow
#### Issue 5: Slow performance
**Solutions:**
- Increase memory allocation (see Issue 3)
- Close other applications
- Use SSD for workspace if possible
---
## Next Steps
After successful installation:
1. **Read the User Guide** - [User Guide](USER_GUIDE.md)
2. **Explore the Dashboard** - [Dashboard Guide](dashboard-guide.md)
3. **Understand the Architecture** - [Architecture](ARCHITECTURE.md)
4. **Try Examples** - Check the examples/ folder
5. **Use Your Own Data** - Start with small datasets
---
## Additional Resources
- [KNIME Documentation](https://docs.knime.com/)
- [KNIME Video Tutorials](https://www.youtube.com/c/KNIME)
- [KNIME Community Hub](https://hub.knime.com/)
- [GitHub Discussions](https://github.com/$RepoOwner/$RepoName/discussions)
- [Issue Tracker](https://github.com/$RepoOwner/$RepoName/issues)
---
**Installation complete!** You're ready to start detecting and correcting UOM errors.
Questions? [Open an issue](https://github.com/$RepoOwner/$RepoName/issues/new)
"@
$installationContent | Out-File -FilePath "docs\INSTALLATION.md" -Encoding UTF8 -Force
Write-Host " [+] docs/INSTALLATION.md created" -ForegroundColor Green
# ----------------------------------------------------------------------------
# dashboard-guide.md
# ----------------------------------------------------------------------------
Write-Host " Creating docs/dashboard-guide.md..." -ForegroundColor Yellow
$dashboardGuideContent = @"
# Visual Dashboard Guide
Complete guide to using the interactive UOM Intelligence Dashboard.
## Overview
The Visual Dashboard is the heart of the platform - a real-time, interactive interface that shows:
- Error detection in progress
- Confidence scores and classifications
- Auto-correction results
- Statistical analytics
- Color-coded visualizations
## Accessing the Dashboard
1. Execute the KNIME workflow
2. Right-click the "Visual Dashboard" node
3. Select "Open View"
4. Dashboard opens in a new window
## Dashboard Components
### Summary Statistics
- **Total Records** processed
- **Errors Found** (count and percentage)
- **Auto-Corrected** (count and percentage)
- **Manual Review** needed (count and percentage)
### Error Classification Chart
Visual breakdown of error types:
- Decimal Errors (35%)
- Unit Mismatches (30%)
- Conversion Issues (20%)
- Format Problems (15%)
### Confidence Score Distribution
Histogram showing ML model confidence:
- **90-100%**: High confidence (auto-correct)
- **70-89%**: Medium confidence (review suggested)
- **Below 70%**: Low confidence (manual required)
### Detailed Results Table
Scrollable table with individual records showing:
- Record ID
- Original UOM
- Detected Error Type
- Suggested Fix
- Confidence Score
- Status (Auto-corrected/Manual Review)
## Interactive Features
### Filtering and Sorting
- Click column headers to sort
- Filter by error type
- Search specific records
- Export results (CSV, Excel, PDF)
### Real-Time Updates
As processing continues:
- Charts update automatically
- Progress bar advances
- New errors appear instantly
## Color Codes
### Status Colors
- Green: Valid/Corrected
- Yellow: Needs review
- Red: Critical error
- Gray: Processing
### Confidence Colors
- Green (90%+): Very confident
- Yellow (70-89%): Moderately confident
- Red (<70%): Low confidence
## Best Practices
1. **Monitor during processing** to identify patterns
2. **Review medium-confidence items** (70-89%)
3. **Export results regularly** for historical tracking
4. **Use filters** to focus on specific error types
5. **Document patterns** for process improvement
## Troubleshooting
### Dashboard Not Loading
- Check JavaScript is enabled in KNIME
- Verify workflow executed successfully
- Try refreshing the view
### Slow Performance
- Reduce table row limit
- Disable real-time updates
- Close other KNIME views
### Missing Data
- Ensure workflow completed
- Check input data loaded correctly
- Re-execute the workflow
## Advanced Features
### Export Options
- **CSV**: For Excel/database import
- **Excel**: With formatting
- **PDF Report**: For documentation
### Custom Views
1. Click Settings (gear icon)
2. Adjust chart types, colors, columns
3. Save layout for reuse
---
Questions? [Open an issue](https://github.com/$RepoOwner/$RepoName/issues) or check the [FAQ](FAQ.md)
"@
$dashboardGuideContent | Out-File -FilePath "docs\dashboard-guide.md" -Encoding UTF8 -Force
Write-Host " [+] docs/dashboard-guide.md created" -ForegroundColor Green
# ----------------------------------------------------------------------------
# CODE_OF_CONDUCT.md
# ----------------------------------------------------------------------------
Write-Host " Creating CODE_OF_CONDUCT.md..." -ForegroundColor Yellow
$cocContent = @"
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
## Our Standards
Examples of behavior that contributes to a positive environment:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior:
* Trolling, insulting/derogatory comments, and personal attacks
* Public or private harassment
* Publishing others' private information without permission
* Other conduct which could reasonably be considered inappropriate
## Enforcement
Project maintainers are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org),
version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
"@
$cocContent | Out-File -FilePath "CODE_OF_CONDUCT.md" -Encoding UTF8 -Force
Write-Host " [+] CODE_OF_CONDUCT.md created" -ForegroundColor Green
# ----------------------------------------------------------------------------
# CONTRIBUTING.md
# ----------------------------------------------------------------------------
Write-Host " Creating CONTRIBUTING.md..." -ForegroundColor Yellow
$contributingContent = @"
# Contributing
Thank you for your interest in contributing!
## Ways to Contribute
### 1. Report Bugs
Found a bug? Help us fix it!
- Use the [bug report template](.github/ISSUE_TEMPLATE/bug_report.md)
- Include steps to reproduce
- Add screenshots if applicable
### 2. Suggest Features
Have an idea for improvement?
- Use the [feature request template](.github/ISSUE_TEMPLATE/feature_request.md)
- Describe the use case
- Explain the expected benefit
### 3. Improve Documentation
- Fix typos
- Clarify explanations