Skip to main content

Crate spatial_narrative

Crate spatial_narrative 

Source
Expand description

§spatial-narrative

A Rust library for representing, analyzing, and working with narratives that unfold across real-world geographic space.

§Overview

spatial-narrative provides tools for:

  • Representing events with geographic coordinates and timestamps
  • Organizing events into coherent narratives
  • Efficient spatial and temporal indexing
  • Graph-based analysis of event relationships
  • Clustering and pattern detection
  • Import/export in standard formats (GeoJSON, CSV, GPX)

§Quick Start

use spatial_narrative::prelude::*;

// Create a location
let location = Location::new(40.7128, -74.0060);

// Create an event
let event = Event::builder()
    .location(location)
    .timestamp(Timestamp::now())
    .text("Something happened here")
    .tag("example")
    .build();

// Create a narrative
let narrative = Narrative::builder()
    .title("My Narrative")
    .event(event)
    .build();

§Modules

  • core - Fundamental types: Location, Timestamp, Event, Narrative
  • index - Spatial and temporal indexing for efficient queries
  • graph - Graph representation of narratives
  • analysis - Metrics, clustering, and movement analysis
  • io - Import/export in various formats
  • transform - Coordinate transformations and projections
  • parser - Extract locations from unstructured text
  • text - Natural language processing utilities

Re-exports§

pub use error::Error;
pub use error::Result;

Modules§

analysis
Analytical tools and metrics for spatial narratives.
core
Core types and traits for spatial narratives.
error
Error types for the library Error types for the spatial-narrative library.
graph
Graph representation of narratives.
index
Spatial and temporal indexing for efficient queries.
io
Import and export of narratives in various formats.
parser
Extract spatial information from unstructured text.
prelude
Prelude module for convenient imports
text
Natural language processing utilities.
transform
Coordinate transformations and projections.