Timeline for import and compare values in csv files according to a condition
Current License: CC BY-SA 4.0
12 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Feb 25, 2020 at 15:17 | comment | added | Rohit Namjoshi | An Association is a map from keys to values, called a hash table or hashmap or dictionary in other languages. You can extract just the keys or just the values using Keys and Values. e.g. #["combinedDatePlot"] & /@ results // Values will extract just the values. | |
| Feb 25, 2020 at 9:04 | comment | added | Waco | Oh sorry, I found two possible ways to solve my second question about assignment. Here gofile.io/?c=tqdb2T but the first still doesn't work. | |
| Feb 25, 2020 at 8:47 | comment | added | Waco | And my second question is for the second answer. I tried to a bit modify the code to get just a list of mean values with assignment with every item. Now I would like to remove this assignment? (See pic: gofile.io/?c=SW8yGu) Do you know how to remove it to get just a simple list with values? | |
| Feb 25, 2020 at 8:45 | comment | added | Waco | Thank you for your help, both answers are great. I just want to ask two things. For the first answer I tried to make not just for one item but for all in folder using stats=FileNames[All,"files"]; data=[#,"Table","FieldSeparator"->";"][[2;;,-2;;]]&/@stats but it didnt work so how can I import and work with all of them? | |
| Feb 25, 2020 at 8:40 | vote | accept | Waco | ||
| Feb 22, 2020 at 22:54 | history | edited | Rohit Namjoshi | CC BY-SA 4.0 | Add function to process a file. |
| Feb 20, 2020 at 18:52 | comment | added | Rohit Namjoshi | Thanks for the explanation. The way I would approach this is to read/process each file and build an association where the top level keys are the file names, second level keys are data and computed metrics (mean for each day, day with highest mean 0-24, highest mean 10-17, etc.) for that file. When the data is structured in this form, it will be a lot easier to analyze and generate plots. If I have time later today I will update my answer with some code. | |
| Feb 20, 2020 at 8:57 | comment | added | Waco | Or maybe, there can be two lists one with values between 0-17h andthe other with 0-24h interval and compare them and if they don't differ much, the program could also use 0-17h values or maybe just print both to see difference. | |
| Feb 20, 2020 at 8:57 | comment | added | Waco | If you ask why there should be an average value for whole day (0-24h) and not the condition value (between 10-17h), it is because of time heat constant because the item can be loaded on much lower loading in time between 0 to 10h and 17 to 24h compared to 10-17h time. I also think it can better reflect the fact that the item could be turned off the previous day or on a relatively low loading. | |
| Feb 20, 2020 at 8:56 | comment | added | Waco | to find average value in this whole day, thus from 0-24h. And this process should be make for all csvs in folder. Then I will have a list with average values in % for each item (csv). In the end, these average values will be sorted in group by 5% and counted, e.g. 3 items are loaded on 50%, 2 items on 45%, 2 on 30%, 1 on 20%, 2 on 10% and the plot will show dependence between the average loading and number of items in %. This plot shows you, if the system is overloaded or not. | |
| Feb 20, 2020 at 8:56 | comment | added | Waco | Let´s say I have 10 csvs where I have values (it is actually el. loading and it is daily load diagrram for 3 month) for 3 months and I get them every day every 10s. Values for different days can differ quite a lot sometimes and sometimes can be even zero for certain period of time. However, the system must be dimensioned for the worst scenario, therefore it must be the day with highest loading (in 3 moth period) in the most crucial time which is between 10h and 17h. Once the program finds this "worst" day in the csv according to 10-17h condition, the next step should be | |
| Feb 19, 2020 at 19:09 | history | answered | Rohit Namjoshi | CC BY-SA 4.0 |