Project

General

Profile

Feature #1491

API: CSV export for network analysis

Added by Bernhard Koschiček-Krombholz over 1 year ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Category:
API
Target version:
Start date:
2021-04-01
Estimated time:

Description

For a network analyisis, we need node and link lists.

Node:

Entities
Entities (Source, Actor, Event, Place, Artefact, Reference) should be in separate CSV based on their view name or system class (to decide).
Entities CSV should contain the basic information (name, description, timespan, maybe basic type) as text/string.

Types
Further types should be in a separate CSV file.

Geometries
Geometries should be in a separate CSV file. As Johannes stated, most tools only support points, so for polygons and linestrings a point has to be calculated.

Link

The following link CSVs will be needed:
  • UI Entities links (direct links between UI Entities)
  • Between UI Entities and Types
  • Between UI Entities and Geometries

The link CSV also should contain relation information

Usage

It would be preferable to select the output of CSV files. Some use cases:

  • Events with type "Change of Property" and all Actors and Places linked to them
  • Places with type "Church" linked to Events
  • Actors linked to other Actors with the link "parent of (child of)"

Please feel free to add use cases!

Development

The API implementation is ready for the use cases.
Next step is to develop a rudimentary csv export in the specific files.


Related issues

Blocked by Feature #1546: API: New search parameterClosed2021-07-12Actions

History

#1

Updated by Bernhard Koschiček-Krombholz over 1 year ago

  • Subject changed from API: CSV export in UI to API: CSV export for network analysis
  • Description updated (diff)
#2

Updated by Alexander Watzinger over 1 year ago

  • Status changed from New to Assigned

Thank you Berni for documenting in such detail. For geometries we already calculate points. It's than called polygon_point and used in map views, see model/database/gis.py

public.ST_AsGeoJSON(public.ST_PointOnSurface(polygon.geom)) AS polygon_point

But this only works for polygons, not sure what to do about lines.

#3

Updated by Bernhard Koschiček-Krombholz about 1 year ago

Dear Johannes, I didn't forget that feature, but right now it is not "possible" (that means it is a lot of effort). But with the overhaul of the API and especially a new filter method, it should be possible.

#4

Updated by Bernhard Koschiček-Krombholz about 1 year ago

#5

Updated by Bernhard Koschiček-Krombholz 8 months ago

  • Description updated (diff)
#6

Updated by Alexander Watzinger 8 months ago

Looks good, can we also use this as a replacement for the backend CSV export. I would very much like to get rid of these admin/backend functions because their usability is very limited.
If not it's also ok, just asking :)

#7

Updated by Bernhard Koschiček-Krombholz 8 months ago

In the long run, we can use it as replacement. But we have to go for little more complex UI integration.

#8

Updated by Bernhard Koschiček-Krombholz 8 months ago

  • Status changed from Assigned to In Progress

First network analysis CSV export is completed. I will send Johannes example data to test it in his network analysis tools.

#9

Updated by Bernhard Koschiček-Krombholz 7 months ago

  • Status changed from In Progress to Closed
  • Target version changed from 208 to 7.3.0

The Entity endpoints have now the parameter option ?export=csvNetwork. The option was also added to the UI if Show API links is on.

#10

Updated by Alexander Watzinger 6 months ago

  • Target version changed from 7.3.0 to 7.2.0

Also available in: Atom PDF