{"id":19881420,"url":"https://github.com/giscience/osmevolution","last_synced_at":"2026-05-14T03:34:27.744Z","repository":{"id":149844511,"uuid":"322652422","full_name":"GIScience/OSMEvolution","owner":"GIScience","description":null,"archived":false,"fork":false,"pushed_at":"2020-12-18T16:49:41.000Z","size":527,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-28T13:29:21.449Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GIScience.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-12-18T16:49:29.000Z","updated_at":"2020-12-21T11:35:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"375d33e5-928d-404b-b30a-e1ffb6a6007f","html_url":"https://github.com/GIScience/OSMEvolution","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GIScience/OSMEvolution","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GIScience%2FOSMEvolution","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GIScience%2FOSMEvolution/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GIScience%2FOSMEvolution/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GIScience%2FOSMEvolution/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GIScience","download_url":"https://codeload.github.com/GIScience/OSMEvolution/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GIScience%2FOSMEvolution/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33009556,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T17:14:11.576Z","updated_at":"2026-05-14T03:34:27.739Z","avatar_url":"https://github.com/GIScience.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OSMEvolution V0.1 [UNDER CONSTRUCTION]  🌍 📈\n\n[![Downloads](https://pepy.tech/badge/OSMEvolution/week)](https://pepy.tech/project/OSMEvolution/week)\n[![Downloads](https://pepy.tech/badge/OSMEvolution/month)](https://pepy.tech/project/OSMEvolution/month)\n\nA package for receiving and restructuring OSM historic object data conveniently. Works for arbitrary OSM objects and all cities.\n\n\n## Installation\n\nCurrently under construction so install from source to avoid old bugs.\n```bash\n$ pip install git+git://github.com/le0x99/OSMEvolution.git\n```\n\n## Usage\n\n```python3\nfrom OSMEvolution.collect import DataCollector\n\n# Initialize the data collector for the desired city.\n\n\u003e\u003e\u003e collector = DataCollector(city=\"Berlin\")  \n```\n\n```python3\n# Retrieve static data of the objects of interest (OOI).\n# The object is defined by\n      # 1. its object type (according to the OSM spatial data model).\n      # 2. its object properties.\n      \n      \n# As an example, we request the data for restaurants in Berlin, whose \"amenity\"-key was valued as \"restaurant\".\n# More granular queries can be done by adding properties to the properties list.\n\n\n\u003e\u003e\u003e collector.get_objects(object_type=\"node\", properties=[\"amenity=restaurant\"])\n\n# The descriptive (static) data of the objects of interest can now be accessed.\n# The static data is a pandas DataFrame object.\n\n\u003e\u003e\u003e static_data = collector.data.get(\"static\").copy()\n\u003e\u003e\u003e static_data.head()\n\n         id  ...                  location\n0  26735749  ...   (52.506911, 13.3228214)\n1  26735759  ...  (52.5062119, 13.3180811)\n2  26735763  ...  (52.5073199, 13.3207804)\n3  29997724  ...  (52.5063184, 13.2846256)\n4  30020303  ...  (52.4907103, 13.3939814)\n\n\n# Now the historic data of the selected objects are requested, aggregated and restructured.\n# To construct a proper time series, we need to specify the frequency of the series, here we choose monthly data.\n\u003e\u003e\u003e collector.build_timeseries(frequency=\"m\")     \n\nCollecting historic data: 100%|████████████| 4055/4055 [07:44\u003c00:00,  5.30it/s]\nExtracting historic entries: 100%|█████████| 4010/4010 [00:14\u003c00:00, 3931.60it/s]\n\n# The historic data and all other data that was produced during restructuring can be accessed via \n\u003e\u003e\u003e collector.data.keys()\n\ndict_keys(['static_raw', 'static', 'raw_history', 'historic_entries', 'timeseries'])\n\n# Accessing the actual timeseries.\n\u003e\u003e\u003e timeseries = collector.data.get(\"timeseries\").copy()\n\u003e\u003e\u003e timeseries\n\n            create  delete  modify  ...  loc_change  new_mapper  activity\n2007-03-31       3       0       0  ...           0           1         3\n2007-04-30       0       0       0  ...           0           0         0\n2007-05-31       0       0       0  ...           0           0         0\n2007-06-30       2       0       0  ...           0           1         2\n2007-07-31       0       0       0  ...           0           0         0\n           ...     ...     ...  ...         ...         ...       ...\n2020-01-31       9       0     124  ...          22          16       133\n2020-02-29      14       1     121  ...          27          10       137\n2020-03-31      28       0     183  ...          47          13       211\n2020-04-30       6       0     116  ...          22          16       122\n2020-05-31       1       0      39  ...           4           9        40\n\n[159 rows x 10 columns]\n\n\u003e\u003e\u003e timeseries.describe()\n\n           create      delete       modify  ...  loc_change  new_mapper     activity\ncount  159.000000  159.000000   159.000000  ...  159.000000  159.000000   159.000000\nmean    25.220126    0.163522   136.823899  ...   26.716981   14.842767   162.371069\nstd     13.986724    0.583249   166.205513  ...   17.304471    8.318452   170.133140\nmin      0.000000    0.000000     0.000000  ...    0.000000    0.000000     0.000000\n25%     16.000000    0.000000    69.000000  ...   16.500000    9.000000    98.000000\n50%     23.000000    0.000000   113.000000  ...   24.000000   14.000000   141.000000\n75%     32.500000    0.000000   156.500000  ...   34.500000   20.000000   184.000000\nmax     67.000000    5.000000  1690.000000  ...  127.000000   37.000000  1747.000000\n\n# Plotting, as usual using pandas.DataFrame methods.\n\n# Looking at all timeseries'\n\u003e\u003e\u003e timeseries.plot(grid=True, title=\"monthly development\", ylim=(0, 1000))\n```\n\n![image.png](1.PNG)\n\n```python3\n\n# Object Evolution (created objects)\n\u003e\u003e\u003e timeseries.create.plot(grid=True, title=\"Created Objects per month\");timeseries.create.cumsum().plot(grid=True, secondary_y=True);plt.ylabel(\"Cumulative\")\n```\n\n![image.png](2.PNG)\n\n```python3\n# Delta distribution for the two major variables, create and modify\n\u003e\u003e\u003e timeseries[[\"create\", \"modify\"]].diff().hist(bins=15);plt.suptitle(\"Distribution of $\\delta_t$\")\n```\n![image.png](3.png)\n\n## Further Examples\n\n#### Schools of New York\n\n```python3\n\nfrom OSMEvolution.collect import DataCollector\n\n\u003e\u003e\u003e collector = DataCollector(city=\"New York\")\n\n\u003e\u003e\u003e collector.get_objects(object_type=\"node\", properties=[\"amenity=school\"])\n\n\u003e\u003e\u003e collector.build_timeseries(frequency=\"m\")\n\n```\n\n## To Do and future work\n\n- buildin Forecasting methods\n- option to impute outliers\n- MultiObject requests\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiscience%2Fosmevolution","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgiscience%2Fosmevolution","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiscience%2Fosmevolution/lists"}