I'm currently enrolled in a Data Science course and am working on a project that examines the evolution of urban complexity. My goal is to analyze and compare the visualizations and data from OpenStreetMap (OSM) for Charlotte, NC, focusing on the data from February 8, 2020, and February 8, 2024. Is there a way to attain the data from the past?
I have successfully downloaded the OSMnx package, not sure what to do next.
Yes, it is possible to view the state of OSM as it existed at a specific point in time in osmnx by using attic data.
In order to request this data, you need to change
overpass_settingsto request data from a specific date.Example:
Using this function, and
ox.plot.plot_graph(), I made an animation of how the road network in downtown Boulder changed over the course of 8 years. This is an example of something you could use attic data for.This example uses
ox.graph.graph_from_point(), but every function which queries data from Overpass can use this technique to get attic data. Here is a list of functions which support this:osmnx.features.features_from_address()osmnx.features.features_from_bbox()osmnx.features.features_from_place()osmnx.features.features_from_point()osmnx.features.features_from_polygon()osmnx.graph.graph_from_address()osmnx.graph.graph_from_bbox()osmnx.graph.graph_from_place()osmnx.graph.graph_from_point()osmnx.graph.graph_from_polygon()This technique comes with a few caveats:
https://overpass-api.de/api, supports attic data, but this might not be true in the future. You can consult this list to find an endpoint which supports attic data.ox.settings.overpass_settingsis global, changing the query date in one function changes it for all functions. For that reason, the code sample above restores original settings as soon as it is done querying.