Project

General

Profile

Actions

Feature #1491

closed

API: CSV export for network analysis

Added by Bernhard Koschiček-Krombholz about 3 years ago. Updated about 2 years 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 1 (0 open1 closed)

Blocked by OpenAtlas - Feature #1546: API: New search parameterClosedBernhard Koschiček-Krombholz2021-07-12Actions
Actions #1

Updated by Bernhard Koschiček-Krombholz about 3 years ago

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

Updated by Alexander Watzinger about 3 years 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.

Actions #3

Updated by Bernhard Koschiček-Krombholz over 2 years 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.

Actions #4

Updated by Bernhard Koschiček-Krombholz over 2 years ago

Actions #5

Updated by Bernhard Koschiček-Krombholz about 2 years ago

  • Description updated (diff)
Actions #6

Updated by Alexander Watzinger about 2 years 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 :)

Actions #7

Updated by Bernhard Koschiček-Krombholz about 2 years ago

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

Actions #8

Updated by Bernhard Koschiček-Krombholz about 2 years 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.

Actions #9

Updated by Bernhard Koschiček-Krombholz about 2 years 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.

Actions #10

Updated by Alexander Watzinger about 2 years ago

  • Target version changed from 7.3.0 to 7.2.0
Actions

Also available in: Atom PDF