Weekly report---Ice
[28/08/2023 - 29/08/2023]
Assigned work
28/08
-Instruction
Work done
28/08
- Separate the Chinese and English pipeline
- Change sync the input CID variable with the variable displayed in PDF
- modify the instruction and pipeline flowchart
[21/08/2023 - 25/08/2023]
Assigned work
21/08
-make an interface for user to input the rawData file
- Debug some code from Carol
22/08
-Finish the Chinese version report
- Continue working on the HTML input
23/08
- Continue working on the HTML input
24/08
- Finish the HTML input interface and start working on the documentation
25/08
- OW_Report instruction
Work done
21/08
- Work on the interface and variable transfer through HTML
- Teach Jason how to download the Vs code, JavaScript and adjust the position accoridngly
- Found a problem with the Chinese Character
- Debug the code in template_generator
22/08
-Figure out how to append Chinese text to the PDF-LIB
- Make the diversity index input automatic, now we don't need to input the starting and ending of the diversity index
- Change the input of XLSX with undefined value type to the N/A in both English and Chinese version
23/08
- Combine the chain function to call one HTML after the other
- Change the variable of input file to the current exported file name so we do not need to change the file name variable
- Test and run the HTML of interface, graph, template generator code. \
24/08
- Solve the problem of chain call HTML
- Create a description in each intermediate HTML file to tell the user where to put the file
- Call the file using the file name imported by the previous generated graph and template file
- Finalize the HTML Input report
25/08
- Finaliza OW report instruction
[14/08/2023 - 18/08/2023]
Assigned work
14/08
-make an interface for user to input the rawData file
-15/08
- Retrieve user input text data
-16/08
-Try to retrieve the file from user input
17/08
-Try to retrieve the file from user input
18/08
-Try to retrieve the file from user input
- Send file name and variable to another Js and HTML
- Call another HTML using current Js
Work done
14/08
-working on the import function and how to import the variable such as name, customer ID, date of analysis to the other Javascript file after we input the data. Normally, the import will be done after the script is run so I am not sure how to import after clicking the button
15/08
- Confuse how to use the export function to export the dynamic data which is change after we input
- Not able to solve the problem above
- faced difficulty in using import statement
because the export will export the object right after running the code. However, I
want the user to input the data and then update the object. But then the object is already exported. I cannot move or set timeout to the export statement so I cannot
change anything right after the code is executed and the object is exported. Using the sessionStorage trigger after the user inputs the data allow me to control the
data after the user input and use them in the other script.
- Try to relocate user input file
- Fail to use fs since woking environment is limited to node.js not browser environment
- Fail to import fs
- Try to use PHP and download PHP
16/08
- Download and run PHP to move the input file to a folder.
- Failed to do so because PHP cannot be run on local server
-Figure out the difference between server-side and client-side
- Download XAMPP to run a web server
- Be able to run PHP file in server-side using XAMPP
17/08
- Be able to move the users' uploaded file to the specified directory using PHP and fetch data in Js
- Be able to retrieve the file name which will be used as a path for other script
- Figure out how to run other scripts from the JavaScript method
18/08
- Combine the window.url to the encodeURLcomponent to send the variable through javascript HTML
- Configure the location of input name, date of analysis, and date of report
- Be able to call the graph function to generate the graph after submitting the file
[07/08/2023 - 011/08/2023]
Assigned work
07/08
-Finalize OW Report
08/08
-Finalize OW Report
09/08
-Finalize OW Report
- Pipeline Instruction
10/08
-instruction
11/08
-make an interface for user to input the rawData file
Work done
07/08
-Include new taxonomy data from a diversity index file
-Make changes to the text size of the taxonomy section
08/08
-change the Word template heading and footer.
- include the first two pages of the OW report into the file and make some adjustments to the code
- Start writing an instruction
09/08
- Append the text and graph into a new template and finalize the OW report
- upload all the file to dropbox
- Writing an instruction
10/08
-Finalize the instruction
11/08
- Make a flowchart process of how to make an interface
- Plan to Use Python with Flask to move the user input file to a specific location.
- Currently facing a problem with the intermediate file namely the graph and template generated by the script because if we want to save PDF using HTML, we cannot specify the path that we want to download
"The ability to save files to specific paths on the user's machine is typically only available in server-side environments, where you have more control over file system operations. In a browser-based JavaScript environment, saving files to specific paths is not possible due to security restrictions."
"It's not possible to specify the save location on the user's machine directly from the browser using JavaScript. The save location is determined by the user's browser settings and preferences. JavaScript in the browser operates within a sandboxed environment that restricts access to the file system for security reasons. This means you cannot directly control where files are saved on the user's machine."
https://stackoverflow.com/questions/33612566/how-to-specify-download-location-in-html-using-javascript
So I need to figure out how to save the file automatically without any control by the user.
[31/07/2023 - 04/08/2023]
Assigned work
31/07
-Insert and append diversity index value into the OW report
01/08
-Insert and append diversity index value into the OW report
02/08
-Insert and append diversity index value into the OW report
- Make a dynamic position that will change by the number of data inputs in the diversity index
- Standardize the taxonomy template
03/08
-Adjust the template through comments
04/08
-Adjust the template through comments
- add the chart into the template
Work done
31/07
-data preparation changing a txt file data into a class structure.
-locate and loop through the expected position in those three rows
01/08
-make the data more dynamic and change them to object structure
- adjust the coloring and position of the appended text
- Update and upload the template
02//08
-standardize the taxonomy template
-make an automatic adjustment to the taxonomy index
- Increase the spacing and adjust the file by Carol's comments.
03/08
- Adjust the template through comments including the spacing, coloring, and text size.
- adjust the template to increase the text size of the bacteria taxonomy index.
04/08
- add the chart to the template
- change the chart location and generate a drawing path that will circulate the chart
[24/07/2023 - 28/07/2023]
Assigned work
24/07
- Adjust and program the Rscript to generate the Excel file of the Gusty Report Explanation
25/07
- Adjust and program the JavaScript to input the description Excel file, diversity index, and questionnaire then process and generate the OW report output excluding the graph
26/07
- Generate another layer of the rectangle on top of the report output file
27/07
-edit and format the trapezoid into a yellow and thicker format
-Try to import the diversity index and display its value
28/07
-Try to import the diversity index and display its value
Work done
24/07
-Finish adjusting the R script such that it will also generate the description text and input corresponding data when running the R script.
25/07
-Program a templateGenerator code to input 21 descriptions demo into the template file at a specific text box.
-Rearrange the directory of the code such that it will be easier to understand.
26/07
-Use drawRectangle function to generate a trapezoid.
-Unable to use transform to modify the rectangle in PDF-LIB
-Change the drawing function to the SVG function
- Be able to generate a trapezoid at each page using the drawSvgPath function from PDF-LIB
27/07
- Using the latest template by Jason, format a new location of the input value number using the Category_ratio.csv file
- Adjust and standardize the distance between the textbox of the OW_Report template so that it will be more suitable for the code.
- Code the program to include all the values and corresponding graphs in the template.
28/07
- Modify HTML such that it can also display PDF at the same time when it is loading
- Formalized and standardized the template and upload it to Dropbox
- Adjust the position of the text regarding the new template
- Test the template generator and the OW_report generator with the data from Kathy
- Adjust the code on the report generator such that it requires the same diagonalized csv data.
- Format and make the code more readable and easier to manipulate the directories
- Upload the sample of the template and the OW_report without the diversity index to the Dropbox>> Categorization pipeline>>OW_report>>Output sample
-Be able to input and access data from txt file.
[17/07/2023 - 21/07/2023]
Assigned work
18/07
- generate OW_Report using JavaScript
19/07
- generate OW_Report using JavaScript
20/07
- generate OW_Report using JavaScript
21/07
- generate OW_Report using JavaScript
Work done
18/07
- Make a plan on how to generate the report. I'll make the other script that will input the template of the report, and fill in the information and text from the three main data sources which are the value from a questionnaire, a brief explanation from Jason, and the diversity index.
- Currently learning the embedFont module that needed to embed the text into the file.
19/07
-Implement the conversion in JavaScript alone without using HTML and fail to do so since we need fetch() function which is connected to the server
-Run the template generator using JavaScript and live server in HTML
-Be able to import PDF, add the PDF pages and write the text in the file.
20/07
-making a flowchart of the pipeline
-Try to overwrite the OW_report PDF file
-Solving the problem of graph location
21/07
-Adjust the graph variable in projOb such that the graph is suitable for the report
-Adjust the location and size variable to merge the graph and report
-Try to generate the graph differently using for loop(first page the graph should shift to the right and starting from the 9th page no graph should be drawn on the canvas)
-Able to attach the graph to the report in different positions of different pages
[10/07/2023 - 14/07/2023]
Assigned work
10/07
-Pie Chart Explanation and report pipeline
11/07
-Pie Chart Explanation and report pipeline
12/07
-Pie Chart Explanation and report pipeline
-Merge PDF
13/07
-Merge PDF
-understand the underlying library
14/07
-update the instruction
Work done
10/07
-Learn that jsPDF which I use to generate the report is only capable to create a "NEW" pdf which is not suitable for our application
-Learning how to use pdfjsLib library to import the template and write the radial chart SVG element on top of that page accordingly
-Understand the process of appending the PDF which we need to copy the pdf canvas, copy the SVG canvas, and then draw them to the same canvas and download it.
11/07
-Pack the souvenirs for an upcoming seminar
-Found a new method to combine the PDF. Initially, I want to import the template to JavaScript and then append the personalized data and graph to it using the pdfjsLib library. Now I found that it is very complex to import and append the pdf. I have a new idea to use the pdf-lib library to combine the Radial bar chart PDF and the template PDF. So we need a section of code that will embed the content of two PDFs into a new PDF. I am currently debugging the Async function on the PDF-lib library.
12/07
-Learn about async function, defer function, fetch API function
-Understand the workflow and mechanism of API
-Understand the blob object to store the file
13/07
-Be able to merge the two PDFs one as a template and the other as a graph
-Understand the async await then catch function in an asynchronous function
-Understand the method used in PDFlib.js including the draw page, embed page, and other method
14/07
-update the Rcode and radial chart generator instructions.
-upload the updated code to the radialChartCode
-upload the new instruction along with flowchart to the instruction folder
-upload the report output sample to the outputsample folder
[03/07/2023 - 07/07/2023]
Assigned work
03/07
-Automatically add the axis for the data in excel and save the file using Macro.
04/07
-instruction and documentation of how to use VBA excel file to prepare the data for PDF generator
05/07
-instruction and documentation of how to use Javascript and HTML to automatically generate the PDF file
-Clean the office in SciencePark
06/07
-Use R to diagonalize the categorization data
-07/07
-Excel R Processing documentation
-Pie Chart Explanation report
Work done
03/07
-learn more about VBA and learn how to write, test, and record Macros
-Automatically add the axis for the data in excel file after running the Macro
-Autosave the file after running the Macro
-Upload those data into the dropbox
04/07
-Finish making the VBA instruction to use VBA excel to process data for Javascript
05/07
-Finish making the instruction and documentation of how to use Javascript and HTML to automatically generate the PDF
-Clean the room
06/07
-Make a diagonal conversion using R
-Convert the string type of R to dataframe so that it does not include the string
-Now facing a problem of R formatting, it change : to .. and - to . so the spec number is not display as usual
07/07
-be able to solve the yesterday probem of the column header change from : to .. and - to . by customize the header before output the file
-Fisnish writing the documentation on how to use R to process the excel file
-Be able to generate multiple pages of PDF attached by SVG in landscape A4.
[26/06/2023 - 30/06/2023]
Assigned work
26/06
-automatically generate PDF after inputting the data
27/06
-automatically generate PDF after inputting the data
28/06
-Generate PDF file from local file (so far I have been uploading the file to my private folder in github)
-Read some literatures related to how to statistically study microbiome with machine learning
29/06
-Adjust the data such that pdf file generated and CSV macro can be automated
30/06
-Adjust the data such that pdf file generated and CSV macro can be automated
(Carol:
1) Dropbox folder for you to upload all the files :
https://www.dropbox.com/sh/343kc2zjv4rmzx3/AADha4sZIMz3zeVu14GZMB_0a?dl=0
2)SQL files from company database: database: https://www.dropbox.com/sh/1j3ojzghiih937t/AABYKvfP2i6bAMo9QTq9jT2Ga?dl=0 )
Work done
26/06
-Understand the process to export the SVG to PDF(need to convert HTML to canvas, convert canvas to PNG, then attach PNG to the PDF file)
- Finish coding the SVG to PDF process but the PDF file is blank.
-Debugging the SVG to PDF function
27/06
-debugging the SVG to PDF function
-The library I used (html2canvas) does not support the conversion of SVG elements. It returns an empty canvas so the conversion is not working.
-Figure out later that it returns an empty canvas because the Canvg function cannot function without document.body.appendChild(element);.
-Figure out that the element does not contain any group<g> element because it was declared outside the data processing function.
-The reason that a PDF file is blank file is because the width and height of the addImage function is too much.
-Now I have finished the automatic conversion of HTML to PDF. However, the PDF quality is not as high as SVG from HTML since the html2pdf will screenshot the HTML and attach it to the PDF file.
28/06
-Be able to generate the PDF file from the local file in the same directories
-Finish reading the liturature.
29/06
- changing the VBA Macro in excel file
-Adjust the code to display the value of bacteria but the barchart and scale needed to be limited at 2.49
30/06
-finish changing the VBA Macro in excel file and automated it with javascript
-test the data from different dataset to generate the radialchart
[19/06/2023-22/06/2023]
Assigned work
19/06
- Group the function and make it more readable
20/06
- Take the supplement packages from Tsuen Wan and arrange the packages in the office.
21/06
-Automate the label if data is more than the X-axis limit (2.00)
23/06
-automatically generate PDF after inputting the data
Work done
- Set all the conditional displays of spec (function for a number label)
[12/06/2023-16/06/2023]
Assigned work
Work done
[01/06/2023-09/06/2023]
Assigned work
Work done
留言
張貼留言