Package: sfnetworks 1.0.0

sfnetworks: Tidy Geospatial Networks

Provides a tidy approach to spatial network analysis, in the form of classes and functions that enable a seamless interaction between the network analysis package 'tidygraph' and the spatial analysis package 'sf'.

Authors:Lucas van der Meer [aut, cre], Lorena Abad [aut], Andrea Gilardi [aut], Robin Lovelace [aut]

sfnetworks_1.0.0.tar.gz
sfnetworks_1.0.0.zip(r-4.5)sfnetworks_1.0.0.zip(r-4.4)sfnetworks_1.0.0.zip(r-4.3)
sfnetworks_1.0.0.tgz(r-4.4-any)sfnetworks_1.0.0.tgz(r-4.3-any)
sfnetworks_1.0.0.tar.gz(r-4.5-noble)sfnetworks_1.0.0.tar.gz(r-4.4-noble)
sfnetworks_1.0.0.tgz(r-4.4-emscripten)sfnetworks_1.0.0.tgz(r-4.3-emscripten)
sfnetworks.pdf |sfnetworks.html
sfnetworks/json (API)
NEWS

# Install 'sfnetworks' in R:
install.packages('sfnetworks', repos = c('https://luukvdmeer.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/luukvdmeer/sfnetworks/issues

Datasets:
  • mozart - Point locations for places about W. A. Mozart in Salzburg, Austria
  • roxel - Road network of Münster Roxel

On CRAN:

geospatial-networksnetwork-analysisrspatialsimple-featuresspatial-analysisspatial-data-sciencespatial-networkstidygraphtidyverse

11.12 score 349 stars 6 packages 330 scripts 2.6k downloads 110 exports 40 dependencies

Last updated 6 days agofrom:7a5ec1acb3. Checks:OK: 1 NOTE: 6. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 17 2024
R-4.5-winNOTENov 17 2024
R-4.5-linuxNOTENov 17 2024
R-4.4-winNOTENov 17 2024
R-4.4-macNOTENov 17 2024
R-4.3-winNOTENov 17 2024
R-4.3-macNOTENov 17 2024

Exports:%>%activateactiveas_sfnetworkbind_spatial_edgesbind_spatial_nodescentrality_straightnesscontract_nodesconvertcreate_from_spatial_linescreate_from_spatial_pointscrystallisecrystallizedodgr_to_sfnetworkdual_weightsedge_azimuthedge_circuityedge_containsedge_contains_properlyedge_coversedge_crossesedge_dataedge_displacementedge_equalsedge_idsedge_intersectsedge_is_covered_byedge_is_disjointedge_is_nearestedge_is_withinedge_is_within_distanceedge_lengthedge_overlapsedge_segment_countedge_touchesevaluate_edge_queryevaluate_node_queryevaluate_weight_specgroup_spatial_dbscanis_sfnetworkis.sfnetworkmake_edges_directedmake_edges_explicitmake_edges_follow_indicesmake_edges_implicitmake_edges_mixedmake_edges_validmorphn_edgesn_nodesnb_to_sfnetworknearest_edge_idsnearest_edgesnearest_node_idsnearest_nodesnode_datanode_equalsnode_idsnode_intersectsnode_is_covered_bynode_is_danglingnode_is_disjointnode_is_nearestnode_is_pseudonode_is_withinnode_is_within_distancenode_Mnode_touchesnode_Xnode_Ynode_Zplay_geometricsf_attrsfnetworksfnetwork_to_dodgrsfnetwork_to_nbsimplify_networksmooth_pseudo_nodesst_duplicatedst_matchst_network_bboxst_network_blendst_network_costst_network_distancest_network_facesst_network_isost_network_joinst_network_pathsst_network_travelst_project_on_networkst_roundsubdivide_edgesto_spatial_contractedto_spatial_directedto_spatial_explicitto_spatial_implicitto_spatial_mixedto_spatial_neighborhoodto_spatial_reversedto_spatial_shortest_pathsto_spatial_simpleto_spatial_smoothto_spatial_subdivisionto_spatial_subsetto_spatial_transformedto_spatial_uniqueunmorphvalidate_networkwith_graphwrap_igraph

Dependencies:classclassIntclicpp11DBIdplyre1071fansigenericsgeometriesglueigraphKernSmoothlatticelifecyclelwgeommagrittrMASSMatrixpillarpkgconfigproxypurrrR6Rcpprlangs2sfsfheadersstringistringrtibbletidygraphtidyrtidyselectunitsutf8vctrswithrwk

Introduction to sfnetworks

Rendered fromsfn01_intro.qmdusingquarto::htmlon Nov 17 2024.

Last update: 2024-11-17
Started: 2024-11-17

Creating and representing spatial networks

Rendered fromsfn02_create_represent.qmdusingquarto::htmlon Nov 17 2024.

Last update: 2024-11-17
Started: 2024-11-17

Cleaning spatial networks

Rendered fromsfn03_cleaning.qmdusingquarto::htmlon Nov 17 2024.

Last update: 2024-11-17
Started: 2024-11-17

Spatial joins and filters

Rendered fromsfn04_join_filter.qmdusingquarto::htmlon Nov 17 2024.

Last update: 2024-11-17
Started: 2024-11-17

Routing on spatial networks

Rendered fromsfn05_routing.qmdusingquarto::htmlon Nov 17 2024.

Last update: 2024-11-17
Started: 2024-11-17

Readme and manuals

Help Manual

Help pageTopics
Extract the geometries of a sfnetwork as a S2 geography vectoras_s2_geography as_s2_geography.sfnetwork
Convert a foreign object to a sfnetworkas_sfnetwork as_sfnetwork.default as_sfnetwork.dodgr_streetnet as_sfnetwork.linnet as_sfnetwork.psp as_sfnetwork.sf as_sfnetwork.sfc as_sfnetwork.sfNetwork as_sfnetwork.tbl_graph
Extract the active element of a sfnetwork as spatial tibbleas_tibble as_tibble.sfnetwork
Convert a sfnetwork into a linnetas.linnet as.linnet.sfnetwork
Plot sfnetwork geometries with ggplot2autoplot autoplot.sfnetwork
Add nodes or edges to a spatial network.bind_spatial bind_spatial_edges bind_spatial_nodes
Contract groups of nodes in a spatial networkcontract_nodes
Create a spatial network from linestring geometriescreate_from_spatial_lines
Create a spatial network from point geometriescreate_from_spatial_points
Extract the node or edge data from a spatial networkdata edge_data node_data
Specify dual edge weightsdual_weights
Query specific edge indices from a spatial networkevaluate_edge_query
Query specific node indices from a spatial networkevaluate_node_query
Specify edge weights in a spatial networkevaluate_weight_spec
Group nodes based on spatial distancegroup_spatial group_spatial_dbscan
Extract all node or edge indices from a spatial networkedge_ids ids node_ids
Check if an object is a sfnetworkis.sfnetwork is_sfnetwork
Convert undirected edges into directed edges based on their geometriesmake_edges_directed
Construct edge geometries for spatially implicit networksmake_edges_explicit
Match the direction of edge geometries to their specified incident nodesmake_edges_follow_indices
Drop edge geometries of spatially explicit networksmake_edges_implicit
Make some edges directed and some undirectedmake_edges_mixed
Match edge geometries to their incident node locationsmake_edges_valid
Point locations for places about W. A. Mozart in Salzburg, Austriamozart
Count the number of nodes or edges in a networkn n_edges n_nodes
Conversion between neighbor lists and sfnetworksnb nb_to_sfnetwork sfnetwork_to_nb
Extract the nearest nodes or edges to given spatial featuresnearest nearest_edges nearest_nodes
Extract the indices of nearest nodes or edges to given spatial featuresnearest_edge_ids nearest_ids nearest_node_ids
Query node coordinatesnode_coordinates node_M node_X node_Y node_Z
Create random spatial networksplay_geometric play_spatial
Plot the geometries of a sfnetworkplot.sfnetwork
Road network of Münster Roxelroxel
Query sf attributes from the active element of a sfnetworksf_attr
sf methods for sfnetworkssf_methods st_agr.sfnetwork st_agr<-.sfnetwork st_area.sfnetwork st_as_s2.sfnetwork st_as_sf.sfnetwork st_bbox.sfnetwork st_coordinates.sfnetwork st_crop.morphed_sfnetwork st_crop.sfnetwork st_crs.sfnetwork st_crs<-.sfnetwork st_difference.morphed_sfnetwork st_difference.sfnetwork st_drop_geometry.sfnetwork st_filter.morphed_sfnetwork st_filter.sfnetwork st_geometry.sfnetwork st_geometry<-.sfnetwork st_intersection.morphed_sfnetwork st_intersection.sfnetwork st_intersects.sfnetwork st_is.sfnetwork st_is_valid.sfnetwork st_join.morphed_sfnetwork st_join.sfnetwork st_m_range.sfnetwork st_nearest_points.sfnetwork st_normalize.sfnetwork st_precision.sfnetwork st_reverse.sfnetwork st_sample.sfnetwork st_segmentize.sfnetwork st_set_precision.sfnetwork st_shift_longitude.sfnetwork st_simplify.sfnetwork st_transform.sfnetwork st_wrap_dateline.sfnetwork st_zm.sfnetwork st_z_range.sfnetwork
Create a sfnetworksfnetwork
Conversion between dodgr streetnets and sfnetworksdodgr_to_sfnetwork sfnetwork_to_dodgr
Simplify a spatial networksimplify_network
Smooth pseudo nodessmooth_pseudo_nodes
Compute spatial centrality measurescentrality_straightness spatial_centrality
Query spatial edge measuresedge_azimuth edge_circuity edge_displacement edge_length edge_segment_count spatial_edge_measures
Query edges with spatial predicatesedge_contains edge_contains_properly edge_covers edge_crosses edge_equals edge_intersects edge_is_covered_by edge_is_disjoint edge_is_nearest edge_is_within edge_is_within_distance edge_overlaps edge_touches spatial_edge_predicates
Morph spatial networks into a different structurespatial_morphers to_spatial_contracted to_spatial_directed to_spatial_explicit to_spatial_implicit to_spatial_mixed to_spatial_neighborhood to_spatial_reversed to_spatial_shortest_paths to_spatial_simple to_spatial_smooth to_spatial_subdivision to_spatial_subset to_spatial_transformed to_spatial_unique
Query nodes with spatial predicatesnode_equals node_intersects node_is_covered_by node_is_disjoint node_is_nearest node_is_within node_is_within_distance node_touches spatial_node_predicates
Query spatial node typesnode_is_dangling node_is_pseudo spatial_node_types
Determine duplicated geometriesst_duplicated
Geometry matchingst_match
Compute the bounding box of a spatial networkst_network_bbox
Blend spatial points into a spatial networkst_network_blend
Compute a cost matrix of a spatial networkst_network_cost st_network_distance
Extract the faces of a spatial networkst_network_faces
Compute isolines around nodes in a spatial networkst_network_iso
Join two spatial networks based on equality of node geometriesst_network_join
Find shortest paths between nodes in a spatial networkst_network_paths
Find the optimal route through a set of nodes in a spatial networkst_network_travel
Project spatial points on a spatial networkst_project_on_network
Rounding of geometry coordinatesst_round
Subdivide edges at interior pointssubdivide_edges
tidygraph methods for sfnetworksas_tbl_graph.sfnetwork morph.sfnetwork reroute.sfnetwork tidygraph_methods unmorph.morphed_sfnetwork
Validate the structure of a sfnetworkvalidate_network
Run an igraph function on an sfnetwork objectwrap_igraph