Data visualization csv file and change through Processing?

Good afternoon, can you tell me if it is possible to edit data in a csv file through processing through visualization?
I found examples of various charts, but how can we change the lines and put dots in this chart for marks?
Would like to know if this is possible!

here is a common example:

/**
 * This example was motivated by the following posts:
 * 
 * http://lisacharlotterost.github.io/2016/05/17/one-chart-tools/
 * http://lisacharlotterost.github.io/2016/05/17/one-chart-code/
 */

import grafica.*;

GPlot plot;

void setup() {
  // Define the window size
  size(750, 410);

  // Load the cvs dataset. 
  // The file has the following format: 
  // country,income,health,population
  // Central African Republic,599,53.8,4900274
  // ...
  Table table = loadTable("data.csv", "header");

  // Save the data in one GPointsArray and calculate the point sizes
  GPointsArray points = new GPointsArray();
  //float[] pointSizes = new float[table.getRowCount()];
  
  for (int row = 0; row < table.getRowCount(); row++) {
    String country = table.getString(row, "country");
    float income = table.getFloat(row, "income");
    float health = table.getFloat(row, "health");
   // int population = table.getInt(row, "population");
    points.add(income, health, country);
    
    // The point area should be proportional to the country population
    // population = pi * sq(diameter/2) 
   // pointSizes[row] = 2 * sqrt(population/(200000 * PI));
  }

  // Create the plot
  plot = new GPlot(this);
  plot.setDim(650, 300);
  plot.setTitleText("Life expectancy connection to average income");
  plot.getXAxis().setAxisLabelText("Personal income ($/year)");
  plot.getYAxis().setAxisLabelText("Life expectancy (years)");
  plot.setLogScale("x");
 // plot.setPoints(points);
 // plot.setPointSizes(pointSizes);
  plot.activatePointLabels();
  plot.activatePanning();
  plot.activateZooming(1.1, CENTER, CENTER);
}

void draw() {
  // Clean the screen
  background(255);

  // Draw the plot  
  plot.beginDraw();
  plot.drawBox();
  plot.drawXAxis();
  plot.drawYAxis();
  plot.drawTitle();
  plot.drawGridLines(GPlot.BOTH);
  plot.drawPoints();
  plot.drawLabels();
  plot.endDraw();
}

can you post your first 5 lines of your csv?

do you want to change data by typing numbers?

You upload the table from the CSV file.
You can modify the table in processing:

You can save the table back to an CSV file with saveTable.

Now your CSV file has the updated information.

2 Likes

Hello, I meant not only numbers, but also lines with dots, can they be moved!

Please post this so we can run your code

Please explain what lines and dots you mean

What do you want to achieve?

2 Likes