From the course: Hands-On PostgreSQL Project: Spatial Data Science

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Spatio-temporal analysis

Spatio-temporal analysis

- In the previous chapters, we focused on either spatial analysis or temporal analysis individually. We analyzed where trips were starting using census tracts and when trips are starting using half hour intervals. But to fully understand the patterns and behavior of trips, we need to combine both elements. In this video, we'll create a query that groups our trips data by both half hour start times and census tracts, which allows us to see exactly when and where trips are happening. This combined analysis helps stakeholders make decisions around resource allocation, staffing, and station management based on both time and location data. By the end of this video, we'll have a query and resulting table that helps us make an animation of choropleth map of trip patterns, and we'll be ready to present to stakeholders. For our query, we'll use ST_Within() function to perform the spatial join to assign trips to the correct census tract based on starting station locations. And then we'll use…

Contents