Feature #1491
closedAPI: CSV export for network analysis
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.
Updated by Bernhard Koschiček-Krombholz over 3 years ago
- Subject changed from API: CSV export in UI to API: CSV export for network analysis
- Description updated (diff)
Updated by Alexander Watzinger over 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.
Updated by Bernhard Koschiček-Krombholz about 3 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.
Updated by Bernhard Koschiček-Krombholz about 3 years ago
- Blocked by Feature #1546: API: New search parameter added
Updated by Bernhard Koschiček-Krombholz almost 3 years ago
- Description updated (diff)
Updated by Alexander Watzinger almost 3 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 :)
Updated by Bernhard Koschiček-Krombholz almost 3 years ago
In the long run, we can use it as replacement. But we have to go for little more complex UI integration.
Updated by Bernhard Koschiček-Krombholz almost 3 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.
Updated by Bernhard Koschiček-Krombholz over 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.
Updated by Alexander Watzinger over 2 years ago
- Target version changed from 7.3.0 to 7.2.0