2

In my little project I have a CSV with more rows than I can count, and I am trying to find a tool that can do the following:

  1. Plot each record on a map using their lat lon coordinates, interactively so a mouse hover can display some metadata.
  2. Each marker is coloured based on the categorical value of one of the columns.
  3. Be able select a subset by area (such as in QGIS), and change their categorical value.
  4. Save these changes back into the original CSV.

I have been able to achieve 1 and 2 with Mapbox in Python/plotly (I know 3 is possible if I do it in JavaScript). I was wondering if there are easier way to do this.

3
  • How big is your data? You can do everything is QGIS. 1. Import delimited text layer + Display : docs.qgis.org/latest/en/docs/user_manual/working_with_vector/… 2. Symbology > Categorized 3. you can it already 4. What kind of changes do you mean exactly ?
    – Taras
    Apr 28 at 11:59
  • do you need to use QGIS? i suggest you to use Appsheet extension of Google sheets Apr 28 at 13:19
  • Yes I forgot to mention that I have also explored with QGIS, and for to step 2.5. My dataset is huge (100K+ records) and I need to update the categorical values in batches, which I could not figure out how to do in QGIS. Any further ideas? Cheers
    – Jason Tam
    Apr 28 at 22:55

1 Answer 1

1

All of this can be achieved using QGIS. A very simple example below:

Sample data

Sample Data

1a. Layer > Data Source Manager > Delimited Text. Select your csv file and ensure all the settings are appropriate (File Format, Header lines etc). Define your point coordinates using the lat lon coordinates in your data. Data Source Manager

1b. Save your layer as a Geopackage or similar. This will allow it to be edited. Save Geopackage

  1. Define symbology within the Layer Properties. Symbology
  2. Select a subset of your data (manually or using an SQL). Then edit the category as required (Field Calculator) can be useful here. Subset enter image description here
  3. Export your updated Geopackage layer to CSV. You can either create a new CSV, or overwrite the original file.

Save to CSV

2
  • Thanks for your thorough answer. I forgot to mention that I also explored down this path, and got stuck when I tried to edit the field for multiple records simultaneously. The Toggle multi edit mode button in the attribute table window is always greyed out, like in your 5th picture. Any fuirther ideas? Cheers
    – Jason Tam
    Apr 28 at 22:58
  • You need to Toggle editing mode first, then the Toggle multi edit mode button will not be greyed out. Have a look at the Editing attribute values documentation. Also for reference, you can edit an attribute for multiple features at the same time without Multi edit mode. Multi edit mode allows you to edit multiple attributes simultaneously.
    – David
    Apr 29 at 8:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.