<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Machine Learning | Alan Hung</title>
    <link>https://alanhung.dev/tag/machine-learning/</link>
      <atom:link href="https://alanhung.dev/tag/machine-learning/index.xml" rel="self" type="application/rss+xml" />
    <description>Machine Learning</description>
    <generator>Wowchemy (https://wowchemy.com)</generator><language>en-us</language><lastBuildDate>Tue, 05 Feb 2019 00:00:00 +0000</lastBuildDate>
    <image>
      <url>https://alanhung.dev/media/icon_hu337733d8e3179de0d1b2aeaca0f6c335_54345_512x512_fill_lanczos_center_3.png</url>
      <title>Machine Learning</title>
      <link>https://alanhung.dev/tag/machine-learning/</link>
    </image>
    
    <item>
      <title>Improving fabric sales through cluster analysis</title>
      <link>https://alanhung.dev/project/improve-fabric-sales/</link>
      <pubDate>Tue, 05 Feb 2019 00:00:00 +0000</pubDate>
      <guid>https://alanhung.dev/project/improve-fabric-sales/</guid>
      <description>&lt;script&gt;removeCoverImage()&lt;/script&gt;
&lt;details class=&#34;toc-inpage d-print-none  &#34; open&gt;
  &lt;summary class=&#34;font-weight-bold&#34;&gt;Table of Contents&lt;/summary&gt;
  &lt;nav id=&#34;TableOfContents&#34;&gt;
  &lt;ul&gt;
    &lt;li&gt;&lt;a href=&#34;#abstract&#34;&gt;Abstract&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#1-introduction&#34;&gt;1. Introduction&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#2-objectives&#34;&gt;2. Objectives&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#3-dataset&#34;&gt;3. Dataset&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#4-exploratory-data-analysis&#34;&gt;4. Exploratory data analysis&lt;/a&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;a href=&#34;#41-distribution&#34;&gt;4.1. Distribution&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&#34;#42-correlation&#34;&gt;4.2. Correlation&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#5-models&#34;&gt;5. Models&lt;/a&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;a href=&#34;#51-dimensionality-reduction&#34;&gt;5.1. Dimensionality reduction&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&#34;#52-cluster-analysis&#34;&gt;5.2. Cluster analysis&lt;/a&gt;
          &lt;ul&gt;
            &lt;li&gt;&lt;a href=&#34;#521-k-means&#34;&gt;5.2.1. K-means&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href=&#34;#522-sales-and-stock&#34;&gt;5.2.2. Sales and Stock&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
        &lt;/li&gt;
        &lt;li&gt;&lt;a href=&#34;#53-regression&#34;&gt;5.3 Regression&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#6-strategy-to-improve-sales&#34;&gt;6. Strategy to Improve Sales&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#7-conclusion&#34;&gt;7. Conclusion&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#reference&#34;&gt;Reference&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/nav&gt;
&lt;/details&gt;
&lt;p&gt;&lt;span id=&#34;milestones-of-business-model&#34;&gt;&lt;/span&gt;&lt;/p&gt;
&lt;script&gt;notationMilestones()&lt;/script&gt;
&lt;h1 id=&#34;abstract&#34;&gt;Abstract&lt;/h1&gt;
&lt;p&gt;We performed cluster analysis and regression on our fabric sales data. Due to the subjective nature of fabric, the features we extracted were not enough to make precise predictions. However, leveraging the results from cluster analysis has improved our sales in two ways:&lt;/p&gt;
&lt;p&gt;First, by providing labels for each cluster, we have given buyers a more organized way to make purchases, resulting in a 50% reduction in processing time for each purchase.&lt;/p&gt;
&lt;p&gt;Second, by identifying the clusters that may lead to high inventory levels, we can allocate our budget more effectively, resulting in up to a 4x improvement in sales.&lt;/p&gt;
&lt;h1 id=&#34;1-introduction&#34;&gt;1. Introduction&lt;/h1&gt;
&lt;p&gt;Understanding customers&amp;rsquo; needs is one of the key strategies to increase sales. For fabric retailers, this can be particularly challenging due to the subjective nature of fabric as a visual artwork. Each customer may have different preferences, which can result in high inventory levels if purchased fabric does not meet their needs. Additionally, fabric selection has traditionally been carried out by experienced buyers, which can be prone to human error and exacerbate the issue.&lt;/p&gt;
&lt;p&gt;To address these issues, we analyze the features extracted from our algorithms&lt;a href=&#34;https://alanhung.dev/project/color-theme-extraction/&#34;&gt;$^1$&lt;/a&gt; &lt;a href=&#34;https://alanhung.dev/project/repeated-pattern-detection/&#34;&gt;$^2$&lt;/a&gt; to gain insights into the fabric. This will help us better understand customer preferences and, consequently, improve sales.&lt;/p&gt;
&lt;h1 id=&#34;2-objectives&#34;&gt;2. Objectives&lt;/h1&gt;
&lt;p&gt;The objective of this project is to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Categorize the fabric by features.&lt;/li&gt;
&lt;li&gt;Identify the category with the most sales and the category with the highest inventory level.&lt;/li&gt;
&lt;li&gt;Predict sales.&lt;/li&gt;
&lt;li&gt;Develop a strategy to improve sales.&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id=&#34;3-dataset&#34;&gt;3. Dataset&lt;/h1&gt;
&lt;p&gt;Data was collected from the previous quarter&amp;rsquo;s sales results, including a total of 3000 fabrics. Table 1 lists detailed descriptions of the extracted features and target.&lt;/p&gt;



&lt;div class=&#34;respon5 bo11 mdc-elevation--z24&#34;&gt;
    
    &lt;div class=&#34;wrap-dropdown-content p-b-10&#34;&gt;
        &lt;h5 data-pre=&#34;Table&amp;nbsp;&#34;
            data-post=&#34;:&#34;
            class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 p-l-15 p-r-15 numbered-table&#34;
            style=&#34;font-weight: normal;&#34;
        &gt;
            &lt;i class=&#34;down-mark fs-16 color1 fa fa-plus float-r dis-none&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            &lt;i class=&#34;up-mark fs-16 color1 fa fa-minus float-r&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            Description of fabric&amp;rsquo;s features and target.
        &lt;/h5&gt;
        &lt;figure class=&#34;dropdown-content p-l-15 p-r-15 dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;

            
            &lt;div class=&#34;flex-w flex-sb p-l-2 p-r-2&#34;&gt;
                
    &lt;div class=&#34;w-size29 respon5&#34;&gt;
  






  
  
  


  




&lt;div class=&#34;data-table&#34; role=&#34;region&#34; tabindex=&#34;0&#34; &gt;
  &lt;table class=&#34;table &#34; id=&#34;597328164&#34;&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Unit&lt;/th&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Range&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;HUE&lt;/td&gt;
&lt;td&gt;degree&lt;/td&gt;
&lt;td&gt;Numerical&lt;/td&gt;
&lt;td&gt;[0, 359]&lt;/td&gt;
&lt;td&gt;Hue of the dominant color.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PERCENT&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;Numerical&lt;/td&gt;
&lt;td&gt;[0, 100]&lt;/td&gt;
&lt;td&gt;Percentage of dominant color.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RANGE&lt;/td&gt;
&lt;td&gt;degree&lt;/td&gt;
&lt;td&gt;Numerical&lt;/td&gt;
&lt;td&gt;[0, 359]&lt;/td&gt;
&lt;td&gt;Range of colors.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;THEME&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;Categorical&lt;/td&gt;
&lt;td&gt;Monochrome, analogous, complementary, triadic, none&lt;/td&gt;
&lt;td&gt;Color themes.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SIZE&lt;/td&gt;
&lt;td&gt;$cm^2$&lt;/td&gt;
&lt;td&gt;Numerical&lt;/td&gt;
&lt;td&gt;[0, 1247.35]&lt;/td&gt;
&lt;td&gt;Pattern size.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CONTRAST&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;Numerical&lt;/td&gt;
&lt;td&gt;[0, 127.5]&lt;/td&gt;
&lt;td&gt;Standard deviation in grayscale.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SALES&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;Numerical&lt;/td&gt;
&lt;td&gt;[0, 100]&lt;/td&gt;
&lt;td&gt;Percentage of sales.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;/div&gt;
   
&lt;/div&gt;



            &lt;/div&gt;
            

        &lt;/figure&gt;
    &lt;/div&gt;
    
&lt;/div&gt;

&lt;p&gt;Fig. 1 shows an example of a fabric property and its corresponding features. As the purchased quantity of each fabric varies, we use the percentage of sales for each fabric, which is calculated by dividing the total sales at the end of the month by the total purchases at the beginning of the month.&lt;/p&gt;
&lt;div class=&#34;respon5 bo11 mdc-elevation--z24&#34;&gt;
    
    &lt;div class=&#34;wrap-dropdown-content p-b-10&#34;&gt;
        &lt;h5 data-pre=&#34;Figure&amp;nbsp;&#34;
            data-post=&#34;:&amp;nbsp;&#34;
            class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 p-l-15 p-r-15 numbered&#34;
            style=&#34;font-weight: normal;&#34;
        &gt;
            &lt;i class=&#34;down-mark fs-16 color1 fa fa-plus float-r dis-none&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            &lt;i class=&#34;up-mark fs-16 color1 fa fa-minus float-r&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            &lt;strong&gt;(a)&lt;/strong&gt; SIZE is the unit size of a repeated pattern. &lt;strong&gt;(b)&lt;/strong&gt; THEME and RANGE are color themes and ranges used in fabric. These are extracted from a color wheel. &lt;strong&gt;(c)&lt;/strong&gt; The CONTRAST is measured as the standard deviation in the grayscale histogram. &lt;strong&gt;(d)&lt;/strong&gt; HUE and PERCENT refer to the hue and percentage of the dominant color.
        &lt;/h5&gt;
        &lt;figure class=&#34;dropdown-content p-l-15 p-r-15 dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;

            
            &lt;div class=&#34;flex-w flex-sb p-l-2 p-r-2&#34;&gt;
                
    &lt;div class=&#34;w-size13 respon5 p-l-2 p-r-2&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;(a)&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
            &lt;img src=&#34;./figure/figure_01.webp&#34; width=&#34;1080&#34; height=&#34;1080&#34;&gt;
        &lt;/figure&gt;
&lt;/div&gt;

        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;(c)&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
            &lt;div id=&#34;histogram-plot&#34;&gt;&lt;/div&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;

    &lt;div class=&#34;w-size13 respon5 p-l-2 p-r-2&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;(b)&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
            &lt;div id=&#34;polar-plot&#34;&gt;&lt;/div&gt;
        &lt;/figure&gt;
&lt;/div&gt;

        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;(d)&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
            &lt;svg width=&#34;100%&#34; height=&#34;195&#34; id=&#34;color-percentage-plot&#34;&gt;&lt;/svg&gt;
            &lt;div class=&#34;flex-sb-m flex-w p-t-15&#34;&gt;
                &lt;div class=&#34;w-size18&#34;&gt;
                    &lt;div class=&#34;m-text28 colorwhite p-b-3&#34;&gt;
                        &lt;span id=&#34;color-percentage-plot-color&#34;&gt;&lt;/span&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
                &lt;div class=&#34;m-text28 colorwhite p-b-3&#34;&gt;
                    &lt;span id=&#34;color-percentage-plot-percentage&#34;&gt;&lt;/span&gt;
                &lt;/div&gt;
            &lt;/div&gt; 
            &lt;svg width=&#34;100%&#34; height=&#34;30&#34;&gt;
                &lt;rect width=&#34;100%&#34; height=&#34;100%&#34; id=&#34;color-percentage-current-color&#34; fill=&#34;white&#34;&gt;&lt;/rect&gt;
            &lt;/svg&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;


            &lt;/div&gt;
            

        &lt;/figure&gt;
    &lt;/div&gt;
    
&lt;/div&gt;

&lt;h1 id=&#34;4-exploratory-data-analysis&#34;&gt;4. Exploratory data analysis&lt;/h1&gt;
&lt;h2 id=&#34;41-distribution&#34;&gt;4.1. Distribution&lt;/h2&gt;
&lt;p&gt;We can perform a descriptive analysis by examining the distribution of each feature and its correlation with sales, as shown in the Fig. 2.&lt;/p&gt;
&lt;p&gt;The percentage of blue and red is high in the main color (HUE). However, HUE is uncorrelated to SALES in Fig. 3, indicating that our customers have no significant preference for the main color of the fabric. Therefore, we will drop this feature in future analyses.&lt;/p&gt;
&lt;p&gt;The RANGE and SIZE of the fabric are relatively small. This is reasonable, as it is difficult to design fabric with a wide color range, large pattern size. Regarding THEME, it is evident that the percentage decreases as the theme becomes more intricate. This makes sense since, similar to RANGE, designing becomes more challenging when there are more limitations on color usage to match the theme.&lt;/p&gt;
&lt;p&gt;In terms of SALES performance, the mean is 40% and the distribution is mainly below this mark.&lt;/p&gt;
&lt;div class=&#34;respon5 bo11 mdc-elevation--z24&#34;&gt;
    
    &lt;div class=&#34;wrap-dropdown-content p-b-10&#34;&gt;
        &lt;h5 data-pre=&#34;Figure&amp;nbsp;&#34;
            data-post=&#34;:&amp;nbsp;&#34;
            class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 p-l-15 p-r-15 numbered&#34;
            style=&#34;font-weight: normal;&#34;
        &gt;
            &lt;i class=&#34;down-mark fs-16 color1 fa fa-plus float-r dis-none&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            &lt;i class=&#34;up-mark fs-16 color1 fa fa-minus float-r&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            Distribution of features.
        &lt;/h5&gt;
        &lt;figure class=&#34;dropdown-content p-l-15 p-r-15 dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;

            
            &lt;div class=&#34;flex-w flex-sb p-l-2 p-r-2&#34;&gt;
                
        &lt;div class=&#34;w-size6 respon5 p-l-2 p-r-2&#34;&gt;
  
            

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;HUE&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
                &lt;div id=&#34;data-info-hue-percentage&#34;&gt;&lt;/div&gt;
            &lt;/figure&gt;
&lt;/div&gt;

        
&lt;/div&gt;

        &lt;div class=&#34;w-size6 respon5 p-l-2 p-r-2&#34;&gt;
  
            

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;PERCENT&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
                &lt;div class=&#34;flex-w flex-sb p-l-15 p-r-15&#34;&gt;
                    &lt;div class=&#34;w-size13&#34;&gt;
  
                        &lt;div id=&#34;data-info-percent-violin&#34;&gt;&lt;/div&gt;
                    
&lt;/div&gt;

                    &lt;div class=&#34;w-size13&#34;&gt;
  
                        &lt;div id=&#34;data-info-percent-table&#34;&gt;&lt;/div&gt;
                    
&lt;/div&gt;

                &lt;/div&gt;
            &lt;/figure&gt;
&lt;/div&gt;

        
&lt;/div&gt;

        &lt;div class=&#34;w-size6 respon5 p-l-2 p-r-2&#34;&gt;
  
            

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;RANGE&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
                &lt;div class=&#34;flex-w flex-sb p-l-15 p-r-15&#34;&gt;
                    &lt;div class=&#34;w-size13&#34;&gt;
  
                        &lt;div id=&#34;data-info-range-violin&#34;&gt;&lt;/div&gt;
                    
&lt;/div&gt;

                    &lt;div class=&#34;w-size13&#34;&gt;
  
                        &lt;div id=&#34;data-info-range-table&#34;&gt;&lt;/div&gt;
                    
&lt;/div&gt;

                &lt;/div&gt;
            &lt;/figure&gt;
&lt;/div&gt;

        
&lt;/div&gt;

        &lt;div class=&#34;w-size6 respon5 p-l-2 p-r-2&#34;&gt;
  
            

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;SIZE&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
                &lt;div class=&#34;flex-w flex-sb p-l-15 p-r-15&#34;&gt;
                    &lt;div class=&#34;w-size13&#34;&gt;
  
                        &lt;div id=&#34;data-info-size-violin&#34;&gt;&lt;/div&gt;
                    
&lt;/div&gt;

                    &lt;div class=&#34;w-size13&#34;&gt;
  
                        &lt;div id=&#34;data-info-size-table&#34;&gt;&lt;/div&gt;
                    
&lt;/div&gt;

                &lt;/div&gt;
            &lt;/figure&gt;
&lt;/div&gt;

        
&lt;/div&gt;

        &lt;div class=&#34;w-size6 respon5 p-l-2 p-r-2&#34;&gt;
  
            

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;CONTRAST&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
                &lt;div class=&#34;flex-w flex-sb p-l-15 p-r-15&#34;&gt;
                    &lt;div class=&#34;w-size13&#34;&gt;
  
                        &lt;div id=&#34;data-info-contrast-violin&#34;&gt;&lt;/div&gt;
                    
&lt;/div&gt;

                    &lt;div class=&#34;w-size13&#34;&gt;
  
                        &lt;div id=&#34;data-info-contrast-table&#34;&gt;&lt;/div&gt;
                    
&lt;/div&gt;

                &lt;/div&gt;
            &lt;/figure&gt;
&lt;/div&gt;

        
&lt;/div&gt;

        &lt;div class=&#34;w-size6 respon5 p-l-2 p-r-2&#34;&gt;
  
            

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;SALES&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
                &lt;div class=&#34;flex-w flex-sb p-l-15 p-r-15&#34;&gt;
                    &lt;div class=&#34;w-size13&#34;&gt;
  
                        &lt;div id=&#34;data-info-sales-violin&#34;&gt;&lt;/div&gt;
                    
&lt;/div&gt;

                    &lt;div class=&#34;w-size13&#34;&gt;
  
                        &lt;div id=&#34;data-info-sales-table&#34;&gt;&lt;/div&gt;
                    
&lt;/div&gt;

                &lt;/div&gt;
            &lt;/figure&gt;
&lt;/div&gt;

        
&lt;/div&gt;

        &lt;div class=&#34;w-size29 respon5&#34;&gt;
  
            

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;THEME&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
                &lt;div class=&#34;flex-w flex-sb p-l-2 p-r-2&#34;&gt;
                    &lt;div class=&#34;w-size19 respon5&#34;&gt;
  
                        &lt;div id=&#34;theme-info-pie-chart&#34;&gt;&lt;/div&gt;
                    
&lt;/div&gt;

                    &lt;div class=&#34;w-size20 respon5&#34;&gt;
  
                        &lt;div id=&#34;theme-info-table&#34;&gt;&lt;/div&gt;
                    
&lt;/div&gt;

                &lt;/div&gt;
            &lt;/figure&gt;
&lt;/div&gt;

        
&lt;/div&gt;



            &lt;/div&gt;
            

        &lt;/figure&gt;
    &lt;/div&gt;
    
&lt;/div&gt;

&lt;h2 id=&#34;42-correlation&#34;&gt;4.2. Correlation&lt;/h2&gt;
&lt;p&gt;Fig. 3 shows the correlation between SALES and features. Despite the low correlation, all below 0.5, we can still gain some insight into customer preferences.&lt;/p&gt;
&lt;div class=&#34;respon5 bo11 mdc-elevation--z24&#34;&gt;
    
    &lt;div class=&#34;wrap-dropdown-content p-b-10&#34;&gt;
        &lt;h5 data-pre=&#34;Figure&amp;nbsp;&#34;
            data-post=&#34;:&amp;nbsp;&#34;
            class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 p-l-15 p-r-15 numbered&#34;
            style=&#34;font-weight: normal;&#34;
        &gt;
            &lt;i class=&#34;down-mark fs-16 color1 fa fa-plus float-r dis-none&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            &lt;i class=&#34;up-mark fs-16 color1 fa fa-minus float-r&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            Correlation coefficient between sales and features.
        &lt;/h5&gt;
        &lt;figure class=&#34;dropdown-content p-l-15 p-r-15 dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;

            
            &lt;div class=&#34;flex-w flex-sb p-l-2 p-r-2&#34;&gt;
                
    &lt;div class=&#34;w-size29 respon5&#34;&gt;
  
        &lt;div id=&#34;correlation-plot-1&#34;&gt;&lt;/div&gt;
    
&lt;/div&gt;



            &lt;/div&gt;
            

        &lt;/figure&gt;
    &lt;/div&gt;
    
&lt;/div&gt;

&lt;p&gt;All features, except for PERCENT, monochrome and non-specific color themes, are positively correlated with sales. This result is quite intuitive. Fig. 4 provides an example: Fabric A has a wider range of colors and a larger pattern size, as well as higher contrast. Additionally, it uses a triadic theme to balance red, blue, and green, resulting in higher visual appeal than Fabric B. Therefore, it is reasonable to assume that Fabric A has higher sales than Fabric B.&lt;/p&gt;
&lt;div class=&#34;respon5 bo11 mdc-elevation--z24&#34;&gt;
    
    &lt;div class=&#34;wrap-dropdown-content p-b-10&#34;&gt;
        &lt;h5 data-pre=&#34;Figure&amp;nbsp;&#34;
            data-post=&#34;:&amp;nbsp;&#34;
            class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 p-l-15 p-r-15 numbered&#34;
            style=&#34;font-weight: normal;&#34;
        &gt;
            &lt;i class=&#34;down-mark fs-16 color1 fa fa-plus float-r dis-none&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            &lt;i class=&#34;up-mark fs-16 color1 fa fa-minus float-r&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            To illustrate the correlation between sales and features, consider the example of two fabrics, A and B. Fabric A has a wider color range, larger pattern size, and higher contrast, resulting in higher visual appeal than B. Therefore, A is likely to have higher sales than B.
        &lt;/h5&gt;
        &lt;figure class=&#34;dropdown-content p-l-15 p-r-15 dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;

            
            &lt;div class=&#34;flex-w flex-sb p-l-2 p-r-2&#34;&gt;
                
    &lt;div class=&#34;w-size13 respon5 p-l-2 p-r-2&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
            &lt;img src=&#34;./figure/figure_02.webp&#34; width=&#34;1080&#34; height=&#34;1080&#34;&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;

    &lt;div class=&#34;w-size13 respon5 p-l-2 p-r-2&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
            &lt;div id=&#34;fabric-comparison&#34;&gt;&lt;/div&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;


            &lt;/div&gt;
            

        &lt;/figure&gt;
    &lt;/div&gt;
    
&lt;/div&gt;

&lt;h1 id=&#34;5-models&#34;&gt;5. Models&lt;/h1&gt;
&lt;p&gt;Before conducting quantitative analysis, it&amp;rsquo;s important to split the data into training and test datasets. This is necessary for verification in the final step of the analysis. Additionally, data standardization is required to ensure that all features have a comparable range.&lt;/p&gt;
&lt;h2 id=&#34;51-dimensionality-reduction&#34;&gt;5.1. Dimensionality reduction&lt;/h2&gt;
&lt;p&gt;As there are both numerical and categorical features, the covariance matrix should be treated differently. For numerical features, we can follow the original definition. However, for categorical features, the covariance matrix is constructed by preserving the $\chi^2$ distance between features. Next, we can perform singular value decomposition on the covariance matrix to find the principal components. In summary, PCA (principal component analysis) and CA (correspondence analysis) are utilized to decrease feature dimensionality.&lt;/p&gt;
&lt;p&gt;The results are shown in the Fig. 5 &lt;strong&gt;(a)&lt;/strong&gt;. We can use three principal components and still preserve 70% of the total variance. The loading of components are also shown in Fig. 5 &lt;strong&gt;(b)&lt;/strong&gt;.&lt;/p&gt;
&lt;div class=&#34;respon5 bo11 mdc-elevation--z24&#34;&gt;
    
    &lt;div class=&#34;wrap-dropdown-content p-b-10&#34;&gt;
        &lt;h5 data-pre=&#34;Figure&amp;nbsp;&#34;
            data-post=&#34;:&amp;nbsp;&#34;
            class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 p-l-15 p-r-15 numbered&#34;
            style=&#34;font-weight: normal;&#34;
        &gt;
            &lt;i class=&#34;down-mark fs-16 color1 fa fa-plus float-r dis-none&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            &lt;i class=&#34;up-mark fs-16 color1 fa fa-minus float-r&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            &lt;strong&gt;(a)&lt;/strong&gt; Variance explained after dimensionality reduction. &lt;strong&gt;(b)&lt;/strong&gt; Loading of the first five principal components.
        &lt;/h5&gt;
        &lt;figure class=&#34;dropdown-content p-l-15 p-r-15 dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;

            
            &lt;div class=&#34;flex-w flex-sb p-l-2 p-r-2&#34;&gt;
                
    &lt;div class=&#34;w-size13 respon5 p-l-2 p-r-2&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;(a)&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
            &lt;div id=&#34;famd-variance-plot&#34;&gt;&lt;/div&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;

    &lt;div class=&#34;w-size13 respon5 p-l-2 p-r-2&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;(b)&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
            &lt;div id=&#34;famd-component-table&#34;&gt;&lt;/div&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;


            &lt;/div&gt;
            

        &lt;/figure&gt;
    &lt;/div&gt;
    
&lt;/div&gt;

&lt;h2 id=&#34;52-cluster-analysis&#34;&gt;5.2. Cluster analysis&lt;/h2&gt;
&lt;h3 id=&#34;521-k-means&#34;&gt;5.2.1. K-means&lt;/h3&gt;
&lt;p&gt;After identifying the turning point in the elbow plot, as shown in Fig. 6 &lt;strong&gt;(a)&lt;/strong&gt;, we have decided to use 3 clusters for further analysis. For each cluster, we calculate the average of its features as shown in the Fig. 6 &lt;strong&gt;(b)&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The first cluster, named &amp;ldquo;Colorful&amp;rdquo;, has higher values in RANGE, CONTRAST, and multiple color themes. The second cluster, named &amp;ldquo;Large pattern&amp;rdquo;, has the highest value in SIZE. In contrast to the first two clusters, the third cluster has only a large positive value in main color percentage (PERCENT) and monochrome color theme, so it is named &amp;ldquo;Plain&amp;rdquo; and should be considered less visually appealing than the first two clusters. Fig. 6 &lt;strong&gt;(c)&lt;/strong&gt; provides examples of fabric for each cluster.&lt;/p&gt;
&lt;div class=&#34;respon5 bo11 mdc-elevation--z24&#34;&gt;
    
    &lt;div class=&#34;wrap-dropdown-content p-b-10&#34;&gt;
        &lt;h5 data-pre=&#34;Figure&amp;nbsp;&#34;
            data-post=&#34;:&amp;nbsp;&#34;
            class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 p-l-15 p-r-15 numbered&#34;
            style=&#34;font-weight: normal;&#34;
        &gt;
            &lt;i class=&#34;down-mark fs-16 color1 fa fa-plus float-r dis-none&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            &lt;i class=&#34;up-mark fs-16 color1 fa fa-minus float-r&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            &lt;strong&gt;(a)&lt;/strong&gt; Elbow plot of K-means analysis. &lt;strong&gt;(b)&lt;/strong&gt; Naming each cluster based on the average value of its features. &lt;strong&gt;(c)&lt;/strong&gt; Visualize the clusters using the first three principal components and provide an example fabric for each cluster.
        &lt;/h5&gt;
        &lt;figure class=&#34;dropdown-content p-l-15 p-r-15 dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;

            
            &lt;div class=&#34;flex-w flex-sb p-l-2 p-r-2&#34;&gt;
                
    &lt;div class=&#34;w-size13 respon5 p-l-2 p-r-2&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;(a)&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
            &lt;div id=&#34;kmeans-elbow-plot&#34;&gt;&lt;/div&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;

    &lt;div class=&#34;w-size13 respon5 p-l-2 p-r-2&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;(b)&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
            &lt;div id=&#34;kmeans-group-table&#34;&gt;&lt;/div&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;

    &lt;div class=&#34;w-size29 respon5&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;(c)&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
            &lt;div id=&#34;kmeans-group-plot&#34;&gt;&lt;/div&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;


    &lt;div class=&#34;w-size6 respon5 p-l-2 p-r-2&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;Colorful&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
            &lt;img id=&#34;colorful&#34; src=&#34;./figure/figure_03.webp&#34; width=&#34;1080&#34; height=&#34;1080&#34;&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;

    &lt;div class=&#34;w-size6 respon5 p-l-2 p-r-2&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;Large pattern&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
            &lt;img id=&#34;large-pattern&#34; src=&#34;./figure/figure_04.webp&#34; width=&#34;1080&#34; height=&#34;1080&#34;&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;

    &lt;div class=&#34;w-size6 respon5 p-l-2 p-r-2&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;Plain&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
            &lt;img id=&#34;plain&#34; src=&#34;./figure/figure_05.webp&#34; width=&#34;1080&#34; height=&#34;1080&#34;&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;


            &lt;/div&gt;
            

        &lt;/figure&gt;
    &lt;/div&gt;
    
&lt;/div&gt;

&lt;h3 id=&#34;522-sales-and-stock&#34;&gt;5.2.2. Sales and Stock&lt;/h3&gt;
&lt;p&gt;Fig. 7 &lt;strong&gt;(a)&lt;/strong&gt; displays the histogram and cumulative curve for the percentage of sales. It is clear that the distribution of &amp;ldquo;Plain&amp;rdquo; fabric is highly concentrated near zero. The accompanying Fig. 7 &lt;strong&gt;(b)&lt;/strong&gt; illustrates the portion of sales and stock. Although &amp;ldquo;Plain&amp;rdquo; fabric constitutes 60% of total stock, it only contributes to 31.9% of sales. In other words, the high inventory level is caused by the excess of &amp;ldquo;Plain&amp;rdquo; fabric. Therefore, we can improve our inventory control by reducing the total portion of “Plain” fabric in every purchase. Test data supports this conclusion (not shown).&lt;/p&gt;
&lt;p&gt;While &amp;ldquo;Colorful&amp;rdquo; fabric has better sales, it also has a higher stock level. Additionally, the histogram and cumulative curve are similar for both &amp;ldquo;Colorful&amp;rdquo; and &amp;ldquo;Large pattern&amp;rdquo; fabrics. Therefore, based on the current information we have, we cannot determine which fabric performs better.&lt;/p&gt;
&lt;div class=&#34;respon5 bo11 mdc-elevation--z24&#34;&gt;
    
    &lt;div class=&#34;wrap-dropdown-content p-b-10&#34;&gt;
        &lt;h5 data-pre=&#34;Figure&amp;nbsp;&#34;
            data-post=&#34;:&amp;nbsp;&#34;
            class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 p-l-15 p-r-15 numbered&#34;
            style=&#34;font-weight: normal;&#34;
        &gt;
            &lt;i class=&#34;down-mark fs-16 color1 fa fa-plus float-r dis-none&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            &lt;i class=&#34;up-mark fs-16 color1 fa fa-minus float-r&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            &lt;strong&gt;(a)&lt;/strong&gt; The histogram and cumulative curve, as well as &lt;strong&gt;(b)&lt;/strong&gt; the sale and stock of each cluster, indicate that the Plain fabric is the root cause of high stock level.
        &lt;/h5&gt;
        &lt;figure class=&#34;dropdown-content p-l-15 p-r-15 dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;

            
            &lt;div class=&#34;flex-w flex-sb p-l-2 p-r-2&#34;&gt;
                
    &lt;div class=&#34;w-size13 respon5 p-l-2 p-r-2&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;(a)&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
            &lt;div id=&#34;kmeans-sales-plot&#34;&gt;&lt;/div&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;

    &lt;div class=&#34;w-size13 respon5 p-l-2 p-r-2&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;(a)&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
            &lt;div id=&#34;kmeans-sales-stock-plot&#34;&gt;&lt;/div&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;


            &lt;/div&gt;
            

        &lt;/figure&gt;
    &lt;/div&gt;
    
&lt;/div&gt;

&lt;h2 id=&#34;53-regression&#34;&gt;5.3 Regression&lt;/h2&gt;
&lt;p&gt;Another goal is to make predictions on sales. To do this, we can first examine the correlation between sales and components from dimension reduction. There is only one component that reaches -0.5, as shown in Fig. 8 &lt;strong&gt;(a)&lt;/strong&gt;, which can be used as a regressor. Secondly, we need to decide on the type of regression to use. As the response variable falls within the continuous range of [0, 1], it is recommended to use beta regression instead of linear or logistic regression 




&lt;span class=&#34;hugo-cite-intext&#34;
        itemprop=&#34;citation&#34;&gt;(&lt;span class=&#34;hugo-cite-group&#34;&gt;

          &lt;a href=&#34;#ferrari-2004&#34;&gt;&lt;span class=&#34;visually-hidden&#34;&gt;Citation: &lt;/span&gt;&lt;span itemprop=&#34;author&#34; itemscope itemtype=&#34;https://schema.org/Person&#34;&gt;&lt;meta itemprop=&#34;givenName&#34; content=&#34;Silvia&#34;&gt;&lt;span itemprop=&#34;familyName&#34;&gt;Ferrari&lt;/span&gt;&lt;/span&gt;&amp;#32;&amp;amp;&amp;#32;&lt;span itemprop=&#34;author&#34; itemscope itemtype=&#34;https://schema.org/Person&#34;&gt;&lt;meta itemprop=&#34;givenName&#34; content=&#34;Francisco&#34;&gt;&lt;span itemprop=&#34;familyName&#34;&gt;Cribari-Neto&lt;/span&gt;&lt;/span&gt;,&amp;#32;&lt;span itemprop=&#34;datePublished&#34;&gt;2004&lt;/span&gt;&lt;/a&gt;&lt;span class=&#34;hugo-cite-citation&#34;&gt; 










&lt;span itemscope
      itemtype=&#34;https://schema.org/Article&#34;
      data-type=&#34;article&#34;&gt;&lt;span itemprop=&#34;author&#34; itemscope itemtype=&#34;https://schema.org/Person&#34;&gt;&lt;span itemprop=&#34;familyName&#34;&gt;Ferrari&lt;/span&gt;,&amp;#32;
    &lt;meta itemprop=&#34;givenName&#34; content=&#34;Silvia&#34; /&gt;
    S.&lt;/span&gt;&amp;#32;&amp;amp;&amp;#32;&lt;span itemprop=&#34;author&#34; itemscope itemtype=&#34;https://schema.org/Person&#34;&gt;&lt;span itemprop=&#34;familyName&#34;&gt;Cribari-Neto&lt;/span&gt;,&amp;#32;
    &lt;meta itemprop=&#34;givenName&#34; content=&#34;Francisco&#34; /&gt;
    F.&lt;/span&gt;
  &amp;#32;
    (&lt;span itemprop=&#34;datePublished&#34;&gt;2004&lt;/span&gt;).
  &amp;#32;&lt;span itemprop=&#34;name&#34;&gt;Beta regression for modelling rates and proportions&lt;/span&gt;.&lt;i&gt;
    &lt;span itemprop=&#34;about&#34;&gt;Journal of applied statistics&lt;/span&gt;,&amp;#32;31(7)&lt;/i&gt;.&amp;#32;&lt;span itemprop=&#34;pagination&#34;&gt;799–815&lt;/span&gt;.&lt;/span&gt;




&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;
.&lt;/p&gt;
&lt;p&gt;The results are shown in Fig. 8 &lt;strong&gt;(b)&lt;/strong&gt;. It is apparent that the accuracy, with only a 0.246 R-squared value, is low due to the low correlation between the component and SALES. In other words, the current features are still insufficient to make precise predictions.&lt;/p&gt;
&lt;div class=&#34;respon5 bo11 mdc-elevation--z24&#34;&gt;
    
    &lt;div class=&#34;wrap-dropdown-content p-b-10&#34;&gt;
        &lt;h5 data-pre=&#34;Figure&amp;nbsp;&#34;
            data-post=&#34;:&amp;nbsp;&#34;
            class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 p-l-15 p-r-15 numbered&#34;
            style=&#34;font-weight: normal;&#34;
        &gt;
            &lt;i class=&#34;down-mark fs-16 color1 fa fa-plus float-r dis-none&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            &lt;i class=&#34;up-mark fs-16 color1 fa fa-minus float-r&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            &lt;strong&gt;(a)&lt;/strong&gt; Correlation between sales and principal components. &lt;strong&gt;(b)&lt;/strong&gt; Result from beta regression with a 0.246 R-squared value.
        &lt;/h5&gt;
        &lt;figure class=&#34;dropdown-content p-l-15 p-r-15 dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;

            
            &lt;div class=&#34;flex-w flex-sb p-l-2 p-r-2&#34;&gt;
                
    &lt;div class=&#34;w-size29 respon5&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;(a)&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
            &lt;div id=&#34;regression-correlation-plot-1&#34;&gt;&lt;/div&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;


    &lt;div class=&#34;w-size29 respon5&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;(b)&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
            &lt;div id=&#34;regression-accuracy-plot&#34;&gt;&lt;/div&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;



            &lt;/div&gt;
            

        &lt;/figure&gt;
    &lt;/div&gt;
    
&lt;/div&gt;

&lt;h1 id=&#34;6-strategy-to-improve-sales&#34;&gt;6. Strategy to Improve Sales&lt;/h1&gt;
&lt;p&gt;While precise predictions may not be possible, we can still improve fabric sales by leveraging the results of cluster analysis. These improvements can be observed in two ways:&lt;/p&gt;
&lt;p&gt;Firstly, by implementing tags such as &amp;ldquo;Colorful,&amp;rdquo; &amp;ldquo;Large Pattern,&amp;rdquo; and &amp;ldquo;Plain&amp;rdquo; in our &lt;a href=&#34;https://demo.alanhung.dev/order-summary-demo/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;in-house library and dashboard&lt;/a&gt;, as shown in Fig. 9, buyers can have a clearer summary of each category. This enables them to make decisions more confidently and efficiently.&lt;/p&gt;
&lt;div class=&#34;respon5 bo11 mdc-elevation--z24&#34;&gt;
    
    &lt;div class=&#34;wrap-dropdown-content p-b-10&#34;&gt;
        &lt;h5 data-pre=&#34;Figure&amp;nbsp;&#34;
            data-post=&#34;:&amp;nbsp;&#34;
            class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 p-l-15 p-r-15 numbered&#34;
            style=&#34;font-weight: normal;&#34;
        &gt;
            &lt;i class=&#34;down-mark fs-16 color1 fa fa-plus float-r dis-none&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            &lt;i class=&#34;up-mark fs-16 color1 fa fa-minus float-r&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            Example of an in-house library and dashboard that is integrated with tags from cluster analysis.
        &lt;/h5&gt;
        &lt;figure class=&#34;dropdown-content p-l-15 p-r-15 dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;

            
            &lt;div class=&#34;flex-w flex-sb p-l-2 p-r-2&#34;&gt;
                
    &lt;div class=&#34;w-size29 respon5&#34;&gt;
  
        &lt;img src=&#34;./figure/dashboard.webp&#34; width=&#34;1080&#34; height=&#34;1042&#34;&gt;
    
&lt;/div&gt;



            &lt;/div&gt;
            

        &lt;/figure&gt;
    &lt;/div&gt;
    
&lt;/div&gt;

&lt;p&gt;Previously, we only made purchases in Q1 and Q3, while fabric sales were limited to Q2 and Q4, as indicated by the 2017 results in Fig. 10. However, after the implementation, we were able to make purchases and sales in all four quarters. In other words, &lt;span style=&#34;color:#FEAE00&#34;&gt;the processing time for each purchase has been reduced from six months to three months.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Secondly, we can allocate our budget more effectively by being more cautious with our purchases of &amp;ldquo;Plain&amp;rdquo; fabric and investing in other fabrics instead. &lt;span style=&#34;color:#FEAE00&#34;&gt;By comparing fabric sales in 2017/Q4 and 2018/Q1, we have observed an improvement of 2.73.&lt;/span&gt;&lt;/p&gt;
&lt;div class=&#34;respon5 bo11 mdc-elevation--z24&#34;&gt;
    
    &lt;div class=&#34;wrap-dropdown-content p-b-10&#34;&gt;
        &lt;h5 data-pre=&#34;Figure&amp;nbsp;&#34;
            data-post=&#34;:&amp;nbsp;&#34;
            class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 p-l-15 p-r-15 numbered&#34;
            style=&#34;font-weight: normal;&#34;
        &gt;
            &lt;i class=&#34;down-mark fs-16 color1 fa fa-plus float-r dis-none&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            &lt;i class=&#34;up-mark fs-16 color1 fa fa-minus float-r&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            Fabric sales per quarter have been tracked since 2017. Since 2018, the purchase process has incorporated the results of cluster analysis, which has led to higher sales. Different colors indicate the before and after implementation.
        &lt;/h5&gt;
        &lt;figure class=&#34;dropdown-content p-l-15 p-r-15 dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;

            
            &lt;div class=&#34;flex-w flex-sb p-l-2 p-r-2&#34;&gt;
                
    &lt;div class=&#34;w-size29 respon5&#34;&gt;
  
        &lt;div id=&#34;fabric-sales-plot&#34;&gt;&lt;/div&gt;
    
&lt;/div&gt;



            &lt;/div&gt;
            

        &lt;/figure&gt;
    &lt;/div&gt;
    
&lt;/div&gt;

&lt;h1 id=&#34;7-conclusion&#34;&gt;7. Conclusion&lt;/h1&gt;
&lt;p&gt;By using K-means, we divided the fabric from the previous quarter&amp;rsquo;s sales into three categories. We discovered that high inventory levels were due to fabrics with a monochrome color theme, high percentage of the main color, low contrast, and small pattern size. We collectively refer to this type of fabric as &amp;ldquo;Plain&amp;rdquo; fabric. While we have not been able to predict sales, categorizing fabric into these categories has proven to be one of the main factors in improving our sales.&lt;/p&gt;
&lt;h1 id=&#34;reference&#34;&gt;Reference&lt;/h1&gt;











&lt;section class=&#34;hugo-cite-bibliography&#34;&gt;
  &lt;dl&gt;
    

      &lt;div id=&#34;ferrari-2004&#34;&gt;
        &lt;dt&gt;
          Ferrari&amp;#32;&amp;amp;&amp;#32;Cribari-Neto

          
          (2004)&lt;/dt&gt;

        &lt;dd&gt;
          










&lt;span itemscope
      itemtype=&#34;https://schema.org/Article&#34;
      data-type=&#34;article&#34;&gt;&lt;span itemprop=&#34;author&#34; itemscope itemtype=&#34;https://schema.org/Person&#34;&gt;&lt;span itemprop=&#34;familyName&#34;&gt;Ferrari&lt;/span&gt;,&amp;#32;
    &lt;meta itemprop=&#34;givenName&#34; content=&#34;Silvia&#34; /&gt;
    S.&lt;/span&gt;&amp;#32;&amp;amp;&amp;#32;&lt;span itemprop=&#34;author&#34; itemscope itemtype=&#34;https://schema.org/Person&#34;&gt;&lt;span itemprop=&#34;familyName&#34;&gt;Cribari-Neto&lt;/span&gt;,&amp;#32;
    &lt;meta itemprop=&#34;givenName&#34; content=&#34;Francisco&#34; /&gt;
    F.&lt;/span&gt;
  &amp;#32;
    (&lt;span itemprop=&#34;datePublished&#34;&gt;2004&lt;/span&gt;).
  &amp;#32;&lt;span itemprop=&#34;name&#34;&gt;Beta regression for modelling rates and proportions&lt;/span&gt;.&lt;i&gt;
    &lt;span itemprop=&#34;about&#34;&gt;Journal of applied statistics&lt;/span&gt;,&amp;#32;31(7)&lt;/i&gt;.&amp;#32;&lt;span itemprop=&#34;pagination&#34;&gt;799–815&lt;/span&gt;.&lt;/span&gt;




&lt;/dd&gt;

      &lt;/div&gt;
  &lt;/dl&gt;
&lt;/section&gt;



&lt;script type=&#34;text/javascript&#34; src=&#34;./js/plot.js&#34;&gt;&lt;/script&gt;
&lt;script&gt;
    figClosed({figuresIndex: [1,2,3,4,5,6,7,8,9,10], tablesIndex: [1], closeInner: true, closeOuter: true})
&lt;/script&gt;
</description>
    </item>
    
    <item>
      <title>Design and Implementation of an in-House Fabric Library</title>
      <link>https://alanhung.dev/project/fabric-library/</link>
      <pubDate>Sun, 10 Dec 2017 00:00:00 +0000</pubDate>
      <guid>https://alanhung.dev/project/fabric-library/</guid>
      <description>&lt;details class=&#34;toc-inpage d-print-none  &#34; open&gt;
  &lt;summary class=&#34;font-weight-bold&#34;&gt;Table of Contents&lt;/summary&gt;
  &lt;nav id=&#34;TableOfContents&#34;&gt;
  &lt;ul&gt;
    &lt;li&gt;&lt;a href=&#34;#abstract&#34;&gt;Abstract&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#1-introduction&#34;&gt;1. Introduction&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#2-objectives&#34;&gt;2. Objectives&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#3-requirement&#34;&gt;3. Requirement&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#4-workflow&#34;&gt;4. Workflow&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#5-result&#34;&gt;5. Result&lt;/a&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;a href=&#34;#51-main-page&#34;&gt;5.1. Main Page&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&#34;#52-fabric-detail-pages&#34;&gt;5.2. Fabric Detail Pages&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&#34;#53-order-summary-page&#34;&gt;5.3 Order Summary Page&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&#34;#54-impact&#34;&gt;5.4 Impact&lt;/a&gt;
          &lt;ul&gt;
            &lt;li&gt;&lt;a href=&#34;#541-efficiency&#34;&gt;5.4.1. Efficiency&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href=&#34;#542-sales&#34;&gt;5.4.2. Sales&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
        &lt;/li&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#6-conclusion&#34;&gt;6. Conclusion&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#7-appendix-implementation-details&#34;&gt;7. Appendix: Implementation Details&lt;/a&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;a href=&#34;#71-framework&#34;&gt;7.1. Framework&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&#34;#72-image-preprocessing-and-feature-extraction&#34;&gt;7.2. Image Preprocessing and Feature Extraction&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&#34;#73-machine-learning-and-model-evaluation&#34;&gt;7.3. Machine learning and Model Evaluation&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&#34;#74-database&#34;&gt;7.4. Database&lt;/a&gt;
          &lt;ul&gt;
            &lt;li&gt;&lt;a href=&#34;#741-schema&#34;&gt;7.4.1. Schema&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href=&#34;#742-batch-update&#34;&gt;7.4.2. Batch update&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
        &lt;/li&gt;
        &lt;li&gt;&lt;a href=&#34;#75-web-service&#34;&gt;7.5. Web Service&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&#34;#76-web-server&#34;&gt;7.6. Web Server&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&#34;#77-client-user-interface&#34;&gt;7.7. Client (User Interface)&lt;/a&gt;
          &lt;ul&gt;
            &lt;li&gt;&lt;a href=&#34;#771-main-page&#34;&gt;7.7.1. Main Page&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href=&#34;#772-fabric-detail-pages-and-order-summary&#34;&gt;7.7.2. Fabric Detail Pages and Order Summary&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
        &lt;/li&gt;
        &lt;li&gt;&lt;a href=&#34;#78-cloud-provider&#34;&gt;7.8. Cloud provider&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/nav&gt;
&lt;/details&gt;
&lt;p&gt;&lt;span id=&#34;milestones-of-business-model&#34;&gt;&lt;/span&gt;&lt;/p&gt;
&lt;script&gt;notationMilestones()&lt;/script&gt;
&lt;h1 id=&#34;abstract&#34;&gt;Abstract&lt;/h1&gt;
&lt;p&gt;This document highlights the need for a fabric library to improve efficiency in fabric-related businesses. To specify the library&amp;rsquo;s requirements, we consider three aspects: System, User, and Administrator. Based on these requirements, we define a workflow for the fabric library that includes feature extraction, machine learning, and web services. The library is implemented using the Django framework and deployed on the Google Cloud Platform. Finally, we evaluate the impact of this library, resulting in up to a 4x improvement in fabric sales and a 50% reduction in the purchase process time.&lt;/p&gt;
&lt;h1 id=&#34;1-introduction&#34;&gt;1. Introduction&lt;/h1&gt;
&lt;p&gt;As a fabric-related business, much of our daily work involves sifting through piles of fabric and communicating with team members using fabric images. This process is time-consuming, exhausting, and inefficient. For example, a designer may spend an hour in the warehouse just to find a particular color and pattern of fabric. Additionally, images may be attached to emails, social media, or even printed out during discussions among team members, making it difficult to systematically compare or review results. To address these issues, we need to create an application that can assist team members in finishing their work more efficiently.&lt;/p&gt;
&lt;h1 id=&#34;2-objectives&#34;&gt;2. Objectives&lt;/h1&gt;
&lt;p&gt;To be more specific, there are two parts in our original workflow that can be improved, as shown in Fig. 1:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&#34;color:#FEAE00&#34;&gt;Reducing the time spent on searching for fabric.&lt;/span&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&#34;color:#FEAE00&#34;&gt;Before&lt;/span&gt;: Workers need to search through all the fabric in the warehouse to find the desired one.&lt;/li&gt;
&lt;li&gt;&lt;span style=&#34;color:#FEAE00&#34;&gt;After&lt;/span&gt;: Workers can input desired features of the fabric into the application, which will retrieve all fabrics that match the input criteria.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style=&#34;color:#FEAE00&#34;&gt;Streamlining the time spent on reviewing fabrics and making purchases more efficiently.&lt;/span&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&#34;color:#FEAE00&#34;&gt;Before&lt;/span&gt;: Workers and stakeholders are reviewing fabric using different tools, which can make it difficult for stakeholders to get a clear picture of all fabrics and can delay the decision-making process for purchases.&lt;/li&gt;
&lt;li&gt;&lt;span style=&#34;color:#FEAE00&#34;&gt;After&lt;/span&gt;: Workers and stakeholders can have discussions based on the same information provided by the application. Additionally, the application&amp;rsquo;s data visualization and machine learning-based predictions can provide valuable insights into the fabric.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;respon5 bo11 mdc-elevation--z24&#34;&gt;
    
    &lt;div class=&#34;wrap-dropdown-content p-b-10&#34;&gt;
        &lt;h5 data-pre=&#34;Figure&amp;nbsp;&#34;
            data-post=&#34;:&amp;nbsp;&#34;
            class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 p-l-15 p-r-15 numbered&#34;
            style=&#34;font-weight: normal;&#34;
        &gt;
            &lt;i class=&#34;down-mark fs-16 color1 fa fa-plus float-r dis-none&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            &lt;i class=&#34;up-mark fs-16 color1 fa fa-minus float-r&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            The figure illustrates two scenarios: the original workflow before using the application, and the workflow after use of the application.
        &lt;/h5&gt;
        &lt;figure class=&#34;dropdown-content p-l-15 p-r-15 dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;

            
            &lt;div class=&#34;flex-w flex-sb p-l-2 p-r-2&#34;&gt;
                
    &lt;div class=&#34;w-size29 respon5&#34;&gt;
  
        &lt;img src=&#34;./figure/objectives_black.webp&#34; width=&#34;3235&#34; height=&#34;2402&#34;&gt;
    
&lt;/div&gt;



            &lt;/div&gt;
            

        &lt;/figure&gt;
    &lt;/div&gt;
    
&lt;/div&gt;

&lt;h1 id=&#34;3-requirement&#34;&gt;3. Requirement&lt;/h1&gt;
&lt;p&gt;To achieve our goals, we can break down the requirements of our application into three aspects: &amp;ldquo;&lt;strong&gt;System&lt;/strong&gt;&amp;rdquo;, &amp;ldquo;&lt;strong&gt;User&lt;/strong&gt;&amp;rdquo;, and &amp;ldquo;&lt;strong&gt;Administrator&lt;/strong&gt;&amp;rdquo;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;System:&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;Store and display information about fabrics&lt;/li&gt;
&lt;li&gt;Extract features from fabrics&lt;/li&gt;
&lt;li&gt;Use machine learning (ML) models to make sales predictions&lt;/li&gt;
&lt;li&gt;Provide a dashboard summarizing each order&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;User:&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;Search and filter fabrics&lt;/li&gt;
&lt;li&gt;Retrieve similar fabrics&lt;/li&gt;
&lt;li&gt;Add fabrics to orders&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Administrator:&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;Evaluate results from ML models&lt;/li&gt;
&lt;li&gt;Batch update the database&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Regarding the requirements of the &lt;strong&gt;System&lt;/strong&gt;, it should be able to store fabric information and display it to users. Additionally, it needs to extract features from the fabric so that users can search, filter, and retrieve similar fabric based on those features. Furthermore, the extracted features can be used in ML models to predict sales and can also be used in a dashboard to help stakeholders or buyers have a clearer view of the order list, enabling them to make decisions more efficiently.&lt;/p&gt;
&lt;p&gt;For &lt;strong&gt;User&lt;/strong&gt;, in addition to searching for fabric, they should be able to add fabrics to their wishlist, cart, or order. As for the &lt;strong&gt;Administrator&lt;/strong&gt;, metrics should be defined so that they can evaluate the ML models that make predictions on sales. Since the supplier will frequently provide new fabrics, batch updates are preferable instead of updating them one by one.&lt;/p&gt;
&lt;h1 id=&#34;4-workflow&#34;&gt;4. Workflow&lt;/h1&gt;
&lt;p&gt;The workflow can be designed logically by considering all the requirements, as shown in Fig. 2.&lt;/p&gt;
&lt;div class=&#34;respon5 bo11 mdc-elevation--z24&#34;&gt;
    
    &lt;div class=&#34;wrap-dropdown-content p-b-10&#34;&gt;
        &lt;h5 data-pre=&#34;Figure&amp;nbsp;&#34;
            data-post=&#34;:&amp;nbsp;&#34;
            class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 p-l-15 p-r-15 numbered&#34;
            style=&#34;font-weight: normal;&#34;
        &gt;
            &lt;i class=&#34;down-mark fs-16 color1 fa fa-plus float-r dis-none&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            &lt;i class=&#34;up-mark fs-16 color1 fa fa-minus float-r&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            Workflow of our application
        &lt;/h5&gt;
        &lt;figure class=&#34;dropdown-content p-l-15 p-r-15 dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;

            
            &lt;div class=&#34;flex-w flex-sb p-l-2 p-r-2&#34;&gt;
                
    &lt;div class=&#34;w-size29 respon5&#34;&gt;
  
        &lt;img src=&#34;./figure/workflow_black.webp&#34; width=&#34;3230&#34; height=&#34;2398&#34;&gt;
    
&lt;/div&gt;



            &lt;/div&gt;
            

        &lt;/figure&gt;
    &lt;/div&gt;
    
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Bucket:&lt;/strong&gt;  To allow fabric suppliers to upload images of fabrics and serve them to our web service, we need to create a &lt;a href=&#34;https://cloud.google.com/storage/docs/buckets&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;cloud storage bucket&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Image Preprocessing&lt;/strong&gt;: Images added to the bucket need to be resized to reduce runtime in feature extraction. Additionally, converting the color space from RGB to HSV is necessary for color theme extraction.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Features Extraction:&lt;/strong&gt; During this stage, features such as the main color, pattern size, and color theme are extracted. Furthermore, we need to obtain sales data for each fabric to use as a target for machine learning.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Machine Learning&lt;/strong&gt;: At this stage, we perform both supervised and unsupervised learning, as described in the &lt;a href=&#34;#73-machine-learning-and-model-evaluation&#34;&gt;Implementation Details section&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Model Evaluation:&lt;/strong&gt; When using machine learning techniques, corresponding metrics are used to evaluate the models. For example, in linear regression, the $R^2$ metric is used for accuracy assessment.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Database:&lt;/strong&gt; The extracted features and predictions from ML models will be updated in the database.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Web Service:&lt;/strong&gt; We use Python for the backend and HTML, JavaScript, and CSS for the frontend to create a web service.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Web Server:&lt;/strong&gt; Since we are using Python on the backend, we can transfer HTTP requests and responses using WSGI. This can be accomplished by using Apache and its modules.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Client:&lt;/strong&gt; Our system only requires three functions for users: searching and filtering fabrics, retrieving similar fabrics, and adding fabrics to an order.&lt;/p&gt;
&lt;h1 id=&#34;5-result&#34;&gt;5. Result&lt;/h1&gt;
&lt;p&gt;Our web service consists of a &lt;a href=&#34;https://demo.alanhung.dev&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;main page&lt;/a&gt;, &lt;a href=&#34;https://demo.alanhung.dev/product/210801_051X4Y/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;fabric detail pages&lt;/a&gt;, and an &lt;a href=&#34;https://demo.alanhung.dev/order-summary-demo/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;order summary page&lt;/a&gt;, all shown in the Fig. 3.&lt;/p&gt;
&lt;div class=&#34;respon5 bo11 mdc-elevation--z24&#34;&gt;
    
    &lt;div class=&#34;wrap-dropdown-content p-b-10&#34;&gt;
        &lt;h5 data-pre=&#34;Figure&amp;nbsp;&#34;
            data-post=&#34;:&amp;nbsp;&#34;
            class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 p-l-15 p-r-15 numbered&#34;
            style=&#34;font-weight: normal;&#34;
        &gt;
            &lt;i class=&#34;down-mark fs-16 color1 fa fa-plus float-r dis-none&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            &lt;i class=&#34;up-mark fs-16 color1 fa fa-minus float-r&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            Pages in our application.
        &lt;/h5&gt;
        &lt;figure class=&#34;dropdown-content p-l-15 p-r-15 dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;

            
            &lt;div class=&#34;flex-w flex-sb p-l-2 p-r-2&#34;&gt;
                
    &lt;div class=&#34;w-size13 respon5 p-l-2 p-r-2&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;Main Page&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
            &lt;a href=&#34;https://demo.alanhung.dev&#34; target=&#34;_blank&#34;&gt;&lt;img src=&#34;./figure/main_page.webp&#34; width=&#34;1080&#34; height=&#34;1379&#34;&gt;&lt;/a&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;

    &lt;div class=&#34;w-size13 respon5 p-l-2 p-r-2&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;Fabric Detail Pages&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
            &lt;a href=&#34;https://demo.alanhung.dev/product/210502_050X2Y/&#34; target=&#34;_blank&#34;&gt;&lt;img src=&#34;./figure/fabric_detail.webp&#34; width=&#34;1080&#34; height=&#34;1507&#34;&gt;&lt;/a&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;

    &lt;div class=&#34;w-size13 respon5 p-l-2 p-r-2&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;Order Summary Page&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
            &lt;a href=&#34;https://demo.alanhung.dev/order-summary-demo/&#34; target=&#34;_blank&#34;&gt;&lt;img src=&#34;./figure/order_summary.webp&#34; width=&#34;1080&#34; height=&#34;1890&#34;&gt;&lt;/a&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;


            &lt;/div&gt;
            

        &lt;/figure&gt;
    &lt;/div&gt;
    
&lt;/div&gt;

&lt;h2 id=&#34;51-main-page&#34;&gt;5.1. Main Page&lt;/h2&gt;
&lt;p&gt;On the left side of the webpage, there are multiple sliders that can be used to filter the range of each feature, including color, pattern size, contrast, and so on. The web page will then display fabrics that match the selected criteria. As for the color theme, since it is a categorical feature, it is designed as a checkbox. Additionally, users can input a fabric ID to retrieve specific fabrics.&lt;/p&gt;
&lt;h2 id=&#34;52-fabric-detail-pages&#34;&gt;5.2. Fabric Detail Pages&lt;/h2&gt;
&lt;p&gt;The polar plot displays the color theme and range. Additionally, histograms of each channel are shown, and the percentage of each color is displayed. Quantitative features such as pattern size and contrast are also included. Finally, the top 12 options for similar fabrics are listed at the bottom of the page.&lt;/p&gt;
&lt;h2 id=&#34;53-order-summary-page&#34;&gt;5.3 Order Summary Page&lt;/h2&gt;
&lt;p&gt;This page serves as an interactive dashboard that not only summarizes the order for the user, but also allows the user to adjust the quantity of fabric to see its impact on the order.&lt;/p&gt;
&lt;p&gt;At the top of the page, there are two pie charts displaying the labels predicted by K-means. These charts remind the user about the proportion of each label. A higher proportion of a specific label, especially &amp;ldquo;Plain&amp;rdquo;, may be risky for sales, as discussed in the &lt;a href=&#34;https://alanhung.dev/project/improve-fabric-sales/&#34;&gt;previous project&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The price and quantity of the order are displayed in the center of the page. Users can adjust the quantity using buttons provided.&lt;/p&gt;
&lt;p&gt;Finally, the features of the fabrics are summarized using a violin plot and a pie chart located at the bottom of the page, which provide insight into the distribution of the features.&lt;/p&gt;
&lt;h2 id=&#34;54-impact&#34;&gt;5.4 Impact&lt;/h2&gt;
&lt;h3 id=&#34;541-efficiency&#34;&gt;5.4.1. Efficiency&lt;/h3&gt;
&lt;p&gt;During the feature extraction stage, we implement algorithms that &lt;span style=&#34;color:#FEAE00&#34;&gt;achieve 12x and 63x improvements in speed compared to human processing&lt;/span&gt; for extracting pattern size and color themes, respectively&lt;a href=&#34;https://alanhung.dev/project/repeated-pattern-detection/#42-result&#34;&gt;$^1$&lt;/a&gt; &lt;a href=&#34;https://alanhung.dev/project/color-theme-extraction/#42-result&#34;&gt;$^2$&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;When it comes to finding similar fabrics, defining the metric can be difficult due to the subjective nature of fabric images. However, the implemented algorithm has been proven to retrieve fabrics that are similar to those perceived by humans&lt;a href=&#34;https://alanhung.dev/project/search-similar-fabric/#32-result&#34;&gt;$^3$&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&#34;542-sales&#34;&gt;5.4.2. Sales&lt;/h3&gt;
&lt;p&gt;Thanks to our in-house library and the hard work of our team members, sales have increased significantly since 2018, as shown in Fig. 4. We have observed &lt;span style=&#34;color:#FEAE00&#34;&gt;up to a 2.73 improvement&lt;/span&gt; compared to 2017. Additionally, we have &lt;span style=&#34;color:#FEAE00&#34;&gt;reduced the process time for each purchase by 50%&lt;/span&gt;, as discussed in a &lt;a href=&#34;https://alanhung.dev/project/improve-fabric-sales/#6-strategy-to-improve-sales&#34;&gt;previous project&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&#34;respon5 bo11 mdc-elevation--z24&#34;&gt;
    
    &lt;div class=&#34;wrap-dropdown-content p-b-10&#34;&gt;
        &lt;h5 data-pre=&#34;Figure&amp;nbsp;&#34;
            data-post=&#34;:&amp;nbsp;&#34;
            class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 p-l-15 p-r-15 numbered&#34;
            style=&#34;font-weight: normal;&#34;
        &gt;
            &lt;i class=&#34;down-mark fs-16 color1 fa fa-plus float-r dis-none&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            &lt;i class=&#34;up-mark fs-16 color1 fa fa-minus float-r&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            Fabric sales per quarter have been tracked since 2017. Since 2018, the purchase process has incorporated the in-house library, which has led to higher sales. Different colors indicate the before and after implementation.
        &lt;/h5&gt;
        &lt;figure class=&#34;dropdown-content p-l-15 p-r-15 dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;

            
            &lt;div class=&#34;flex-w flex-sb p-l-2 p-r-2&#34;&gt;
                
    &lt;div class=&#34;w-size29 respon5&#34;&gt;
  
        &lt;div id=&#34;fabric-sales-plot&#34;&gt;&lt;/div&gt;
    
&lt;/div&gt;



            &lt;/div&gt;
            

        &lt;/figure&gt;
    &lt;/div&gt;
    
&lt;/div&gt;

&lt;h1 id=&#34;6-conclusion&#34;&gt;6. Conclusion&lt;/h1&gt;
&lt;p&gt;We take a systematic approach to building an in-house library for fabric. This approach includes analyzing requirements, selecting a framework, implementation, and deployment. The library has proven to be useful in significantly increasing sales and reducing the time required for the purchase and design process.&lt;/p&gt;
&lt;div class=&#34;p-b-20&#34;&gt;&lt;/div&gt;
&lt;hr&gt;
&lt;div class=&#34;p-b-20&#34;&gt;&lt;/div&gt;
&lt;h1 id=&#34;7-appendix-implementation-details&#34;&gt;7. Appendix: Implementation Details&lt;/h1&gt;
&lt;h2 id=&#34;71-framework&#34;&gt;7.1. Framework&lt;/h2&gt;
&lt;p&gt;As Python is our main programming language, we have opted to use the &lt;a href=&#34;https://www.djangoproject.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Django framework&lt;/a&gt; to construct our web service. This framework offers all the essential components and features, including frontend development with JavaScript, HTML, and CSS, and backend interaction through an object-relational mapper (ORM).&lt;/p&gt;
&lt;h2 id=&#34;72-image-preprocessing-and-feature-extraction&#34;&gt;7.2. Image Preprocessing and Feature Extraction&lt;/h2&gt;
&lt;p&gt;We use &lt;a href=&#34;https://opencv.org/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;OpenCV&lt;/a&gt; with Python for image manipulation tasks, such as importing, exporting, resizing, and color space conversion. We also implement our own algorithm to extract features, including &lt;a href=&#34;https://alanhung.dev/project/color-theme-extraction/#3-program&#34;&gt;color themes&lt;/a&gt; and &lt;a href=&#34;https://alanhung.dev/project/repeated-pattern-detection/#32-approach-with-l_2-loss&#34;&gt;pattern sizes&lt;/a&gt;. Similar fabrics are also considered as a feature and are extracted based on &lt;a href=&#34;https://alanhung.dev/project/search-similar-fabric/#23-perceptual-similarity-lpips&#34;&gt;perceptual similarity&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;73-machine-learning-and-model-evaluation&#34;&gt;7.3. Machine learning and Model Evaluation&lt;/h2&gt;
&lt;p&gt;We perform dimensionality reduction, K-means clustering, and beta regression on the extracted features. The procedure and results are discussed in the &lt;a href=&#34;https://alanhung.dev/project/improve-fabric-sales/&#34;&gt;previous project&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;74-database&#34;&gt;7.4. Database&lt;/h2&gt;
&lt;h3 id=&#34;741-schema&#34;&gt;7.4.1. Schema&lt;/h3&gt;
&lt;p&gt;Fig. 5 provides a simplified schema as an example. We have created a &amp;ldquo;Fabric&amp;rdquo; table to store the features of fabrics. For each item in an order, we create an &amp;ldquo;OrderItem&amp;rdquo; table and use &amp;ldquo;order_id&amp;rdquo; and &amp;ldquo;fabric_id&amp;rdquo; as foreign keys. Lastly, for each order, an &amp;ldquo;Order&amp;rdquo; table is created, with &amp;ldquo;user_id&amp;rdquo; used as the foreign key.&lt;/p&gt;
&lt;div class=&#34;respon5 bo11 mdc-elevation--z24&#34;&gt;
    
    &lt;div class=&#34;wrap-dropdown-content p-b-10&#34;&gt;
        &lt;h5 data-pre=&#34;Figure&amp;nbsp;&#34;
            data-post=&#34;:&amp;nbsp;&#34;
            class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 p-l-15 p-r-15 numbered&#34;
            style=&#34;font-weight: normal;&#34;
        &gt;
            &lt;i class=&#34;down-mark fs-16 color1 fa fa-plus float-r dis-none&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            &lt;i class=&#34;up-mark fs-16 color1 fa fa-minus float-r&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            The simplified schema of our database.
        &lt;/h5&gt;
        &lt;figure class=&#34;dropdown-content p-l-15 p-r-15 dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;

            
            &lt;div class=&#34;flex-w flex-sb p-l-2 p-r-2&#34;&gt;
                
    &lt;div class=&#34;w-size29 respon5&#34;&gt;
  
        &lt;img src=&#34;./figure/schema_black.webp&#34; width=&#34;1961&#34; height=&#34;1424&#34;&gt;
    
&lt;/div&gt;



            &lt;/div&gt;
            

        &lt;/figure&gt;
    &lt;/div&gt;
    
&lt;/div&gt;

&lt;h3 id=&#34;742-batch-update&#34;&gt;7.4.2. Batch update&lt;/h3&gt;
&lt;p&gt;To perform batch updates in a database using Django, we create a custom django-admin command. The following is an example of importing CSV data and writing it into the “Fabric” table in a database.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;Command&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;BaseCommand&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;help&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;load fabric data&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;handle&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;bp&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;args&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;**&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;options&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;c1&#34;&gt;# Custom function for loading data in CSV format&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;data&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;load_data&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;file&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;./example.csv&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;				
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;i&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;range&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;len&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;data&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;c1&#34;&gt;# Write data to each column&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;n&#34;&gt;row_data&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;n&#34;&gt;row_data&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;fabric_name&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;data&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;i&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;][&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;n&#34;&gt;row_data&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;main_color&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;data&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;i&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;][&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;o&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;c1&#34;&gt;# Save data to Fabric table&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;n&#34;&gt;item&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Fabric&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;**&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;row_data&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;n&#34;&gt;item&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;save&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;75-web-service&#34;&gt;7.5. Web Service&lt;/h2&gt;
&lt;p&gt;We use Django&amp;rsquo;s class-based views to build our web pages. Setting up the connection with the database and template only requires few lines of code. Additionally, built-in pagination can be used to achieve multi-page content.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;ShopView&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ListView&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;model&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Fabric&lt;/span&gt;  &lt;span class=&#34;c1&#34;&gt;# Table name in database&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;paginate_by&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;6&lt;/span&gt;  &lt;span class=&#34;c1&#34;&gt;# 6 items for each page&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;template_name&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;shop/shop.html&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Meeting user requirements for filtering or searching fabric involves setting up a frontend user interface to receive user requests and a backend to query the database.&lt;/p&gt;
&lt;p&gt;To achieve this on the frontend, a classic range slider and a checkbox can be used. On the backend, we need to use the &amp;ldquo;setup&amp;rdquo; method to receive these requests from the frontend, parse them, and make a query to the database using &amp;ldquo;get_queryset&amp;rdquo;. The following code provides an example of how to filter content in shop.html based on a user&amp;rsquo;s request for a specific hue range.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;ShopView&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ListView&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;model&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Fabric&lt;/span&gt;  &lt;span class=&#34;c1&#34;&gt;# Table name in database&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;paginate_by&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;6&lt;/span&gt;  &lt;span class=&#34;c1&#34;&gt;# 6 items for each page&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;template_name&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;shop/shop.html&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;filters&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;setup&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;bp&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;request&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;args&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;**&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;kwargs&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;s2&#34;&gt;&amp;#34;&amp;#34;&amp;#34;Initialize attributes shared by all view methods.&amp;#34;&amp;#34;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nb&#34;&gt;super&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;setup&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;request&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;args&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;**&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;kwargs&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;bp&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;parse_request&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;get_queryset&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;bp&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;s2&#34;&gt;&amp;#34;&amp;#34;&amp;#34;Make queries to the database.&amp;#34;&amp;#34;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;new_queryset&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Fabric&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;objects&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;filter&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;**&lt;/span&gt;&lt;span class=&#34;bp&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;filters&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;new_queryset&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;parse_request&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;bp&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;s2&#34;&gt;&amp;#34;&amp;#34;&amp;#34;Receive request and update to filter for queryset&amp;#34;&amp;#34;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;low&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;bp&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;request&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;GET&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;get&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;hue_low&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;high&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;bp&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;request&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;GET&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;get&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;hue_high&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;bp&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;filters&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;hue__range&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;low&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;high&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Another requirement is to keep track of the order list across different pages. This can be achieved by using cookie in frontend. The following example demonstrates how to update a cart&amp;rsquo;s content in a cookie using JavaScript.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-jsx&#34; data-lang=&#34;jsx&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;updateCart&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;cart&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;){&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nb&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;cookie&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;cart=&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;JSON&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;stringify&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;cart&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;updateQuantity&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;fabricName&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;quantity&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;cart&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;fabricName&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;cart&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nx&#34;&gt;cart&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;fabricName&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;parseInt&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;cart&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;fabricName&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;])&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;parseInt&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;quantity&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;else&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nx&#34;&gt;cart&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;fabricName&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;parseInt&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;quantity&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nx&#34;&gt;updateCart&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;cart&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;76-web-server&#34;&gt;7.6. Web Server&lt;/h2&gt;
&lt;p&gt;As our web service is built with Python, we can use WSGI to forward requests from the web server. Apache with mod_wsgi provides a simple way to set up a directory for Python scripts, and virtual environments in the configuration file. The following code provides an example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Macro&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;DjangoWSGI&lt;/span&gt; &lt;span class=&#34;err&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;document&lt;/span&gt; &lt;span class=&#34;err&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;script&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;WSGIDaemonProcess&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;demo&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;python&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;home&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;$script/venv&amp;#34;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;python&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;path&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;$script&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;WSGIProcessGroup&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;demo&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;WSGIScriptAlias&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;/&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;$script/site_settings/wsgi.py&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Directory&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;$script/site_settings&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Files&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;wsgi&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;py&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;n&#34;&gt;Require&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;all&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;granted&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;o&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Files&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;o&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Directory&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Macro&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;77-client-user-interface&#34;&gt;7.7. Client (User Interface)&lt;/h2&gt;
&lt;p&gt;We have created three pages for our user interface based on our requirements: the &lt;strong&gt;main page&lt;/strong&gt;, &lt;strong&gt;fabric detail pages&lt;/strong&gt;, and &lt;strong&gt;order summary page&lt;/strong&gt;, as shown in Fig. 6.&lt;/p&gt;
&lt;div class=&#34;respon5 bo11 mdc-elevation--z24&#34;&gt;
    
    &lt;div class=&#34;wrap-dropdown-content p-b-10&#34;&gt;
        &lt;h5 data-pre=&#34;Figure&amp;nbsp;&#34;
            data-post=&#34;:&amp;nbsp;&#34;
            class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 p-l-15 p-r-15 numbered&#34;
            style=&#34;font-weight: normal;&#34;
        &gt;
            &lt;i class=&#34;down-mark fs-16 color1 fa fa-plus float-r dis-none&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            &lt;i class=&#34;up-mark fs-16 color1 fa fa-minus float-r&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            Draft layout of the user interface.
        &lt;/h5&gt;
        &lt;figure class=&#34;dropdown-content p-l-15 p-r-15 dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;

            
            &lt;div class=&#34;flex-w flex-sb p-l-2 p-r-2&#34;&gt;
                
    &lt;div class=&#34;w-size13 respon5 p-l-2 p-r-2&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;Main Page&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
            &lt;img src=&#34;./figure/main_page_ui.webp&#34; width=&#34;1080&#34; height=&#34;534&#34;&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;

    &lt;div class=&#34;w-size13 respon5 p-l-2 p-r-2&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;Fabric Detail Pages&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
            &lt;img src=&#34;./figure/fabric_detail_ui.webp&#34; width=&#34;1080&#34; height=&#34;795&#34;&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;

    &lt;div class=&#34;w-size13 respon5 p-l-2 p-r-2&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;Order Summary Page&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
            &lt;img src=&#34;./figure/order_summary_ui.webp&#34; width=&#34;1080&#34; height=&#34;907&#34;&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;


            &lt;/div&gt;
            

        &lt;/figure&gt;
    &lt;/div&gt;
    
&lt;/div&gt;

&lt;h3 id=&#34;771-main-page&#34;&gt;7.7.1. Main Page&lt;/h3&gt;
&lt;p&gt;We use range sliders to allow users to specify the range of each feature. A search box is used to retrieve fabric based on the fabric&amp;rsquo;s ID.&lt;/p&gt;
&lt;p&gt;To create range sliders, begin by adding three progress bars that will serve as its appearance.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;wrap-filter-bar&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;hue-filter-bar&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;hue-progress&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;hue-progress-mask-left&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;hue-progress-mask-right&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Next, add two inputs to specify the upper and lower bounds of the feature.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;hue-input&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;field&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;label&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;for&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;hue_min&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;input&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;range&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;hue_min&amp;#34;&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;...&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;label&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;label&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;for&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;hue_max&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;input&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;range&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;hue_max&amp;#34;&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;...&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;label&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Add an event listener to each input to update the progress bars based on the user&amp;rsquo;s input.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-jsx&#34; data-lang=&#34;jsx&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;slider&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;gap&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;// Retrieve html elements
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;kd&#34;&gt;let&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;rangeInput&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;querySelectorAll&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;sb&#34;&gt;`.&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;sb&#34;&gt;-input input`&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;let&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;progress&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;querySelector&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;sb&#34;&gt;`.leftbar #&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;sb&#34;&gt;-filter-bar .&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;sb&#34;&gt;-progress`&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;let&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;progressMaskLeft&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;querySelector&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;sb&#34;&gt;`.leftbar #&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;sb&#34;&gt;-filter-bar .&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;sb&#34;&gt;-progress-mask-left`&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;let&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;progressMaskRight&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;querySelector&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;sb&#34;&gt;`.leftbar #&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;sb&#34;&gt;-filter-bar .&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;sb&#34;&gt;-progress-mask-right`&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;// Add event listener
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;nx&#34;&gt;rangeInput&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;forEach&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;input&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nx&#34;&gt;input&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;addEventListener&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;input&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;event&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;c1&#34;&gt;// Retrieve value from input
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;            &lt;span class=&#34;kd&#34;&gt;let&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;minVal&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;parseInt&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;rangeInput&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;].&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;value&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;kd&#34;&gt;let&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;maxVal&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;parseInt&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;rangeInput&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;].&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;value&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;c1&#34;&gt;// Update progress bar
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;            &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;maxVal&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;-&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;minVal&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;gap&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;event&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;target&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;className&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;===&lt;/span&gt; &lt;span class=&#34;sb&#34;&gt;`&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;sb&#34;&gt;-min`&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                    &lt;span class=&#34;nx&#34;&gt;rangeInput&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;].&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;value&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;maxVal&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;-&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;gap&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;else&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                    &lt;span class=&#34;nx&#34;&gt;rangeInput&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;].&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;value&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;minVal&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;gap&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;else&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;nx&#34;&gt;updateProgressAndDisplay&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(...);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Finally, create a button to submit the input values to the backend.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;button&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;submit&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Filter&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;button&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;A search box can be created simply by using HTML.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;search-product&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;form&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;search-box&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;method&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;GET&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;action&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;label&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;for&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;search-product&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;input&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;text&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                   &lt;span class=&#34;na&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;search-product&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                   &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;search-product&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                   &lt;span class=&#34;na&#34;&gt;placeholder&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Search Products...&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;label&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;button&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;submit&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;button&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;form&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;772-fabric-detail-pages-and-order-summary&#34;&gt;7.7.2. Fabric Detail Pages and Order Summary&lt;/h3&gt;
&lt;p&gt;The primary goal is to visualize the features for each fabric and summarize the order with plots. To achieve this, we rely on &lt;a href=&#34;https://plotly.com/javascript/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Plotly&lt;/a&gt;, JavaScript, and CSS, as they provide interactive and responsive plots for users. For example, a scatter plot can be created by providing the id of the HTML element and the x and y data, respectively.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-jsx&#34; data-lang=&#34;jsx&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;scatterPlot&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;plotID&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;x&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;y&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;let&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;data&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;nx&#34;&gt;x&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;x&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;nx&#34;&gt;y&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;y&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;nx&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;scatter&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;nx&#34;&gt;mode&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;line&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nx&#34;&gt;Plotly&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;newPlot&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;plotID&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;data&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;78-cloud-provider&#34;&gt;7.8. Cloud provider&lt;/h2&gt;
&lt;p&gt;We chose Google Cloud Platform (GCP) as our cloud provider because it has the lowest latency of 18 ms in Taiwan compared to AWS and Azure. Although GCP provides many convenient options for deploying a web service, such as &lt;a href=&#34;https://cloud.google.com/appengine&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;App Engine&lt;/a&gt; or &lt;a href=&#34;https://cloud.google.com/run&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Cloud Run&lt;/a&gt;, we have chosen to use &lt;a href=&#34;https://cloud.google.com/products/compute&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Compute Engine&lt;/a&gt;. The reason for this is that it allows for more precise control and direct management of virtual machines (VMs). For instance, we can select CPU and RAM according to our budget, and choose a region with the lowest latency.&lt;/p&gt;



&lt;h1 id=&#34;&#34;
    class=&#34;js-toggle-dropdown-content cs-pointer color0-hov trans-0-4&#34;
&gt;
    
&lt;/h1&gt;
&lt;div class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
    
    
    
&lt;/div&gt;

    


&lt;script type=&#34;text/javascript&#34; src=&#34;./js/plot.js&#34;&gt;&lt;/script&gt;
</description>
    </item>
    
  </channel>
</rss>
