LAST RUN: APR 24, 2023
OSMstats is a website maintained by
Pascal Neis, containing "statistics of the free wiki
world map"; that is, statistics of OpenStreetMap.
Particularly, the Countries tab
records the daily activity in as many as 260 territories. This repository applies
web scraping to obtain, every Monday, the prior week's activity; it relies on the
R
language and packages renv
, rvest
and dplyr
.
OpenStreetMap data (© OpenStreetMap contributors) has an Open Database License. Products derived from it (such as this repository) must be distributed with the same license; as stated at OpenStreetMap's Copyright webpage:
OpenStreetMap® is open data, licensed under the Open Data Commons Open Database License (ODbL) by the OpenStreetMap Foundation (OSMF). You are free to copy, distribute, transmit and adapt our data, as long as you credit OpenStreetMap and its contributors. If you alter or build upon our data, you may distribute the result only under the same licence.
Credit goes to Pascal Neis for processing the daily contributions and grouping them by country; note that this process may result in inaccuracies between 2% and 10%.
This repository has a main.yaml
workflow, scheduled to run around
03:13 UTC on Monday; it executes R/main.R
, which in turn executes:
R/scrape_tables.R
usesrvest
to obtain tables of data, from the OSMstats websiteR/write_data.R
usesdplyr
to aggregate the data, and write it into a single fileR/write_readme.R
updates this readme
In this way, the activity corresponding to the previous week is recorded into a comma-separated values (.csv) file. Files for each week since October 31, 2011 are available in the data folder; to use them, start by cloning the repository:
git clone https://github.com/ruevko/Weekly-OSM.git
Then launch R
inside the Weekly-OSM folder and run renv::restore()
. renv
is
a package that manages dependencies, and will install what is required to work with
the data. Finally, run source("R/read_all_data.R")
; a weekly_osm_data
tibble
will be created, containing all available observations up to that moment.