Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simonkassel/us-osm-data
extract nationwide OSM data by key-value pair
https://github.com/simonkassel/us-osm-data
Last synced: 1 day ago
JSON representation
extract nationwide OSM data by key-value pair
- Host: GitHub
- URL: https://github.com/simonkassel/us-osm-data
- Owner: simonkassel
- License: mit
- Created: 2017-10-09T14:52:48.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-09T15:35:19.000Z (over 7 years ago)
- Last Synced: 2024-11-10T13:48:56.241Z (about 2 months ago)
- Language: R
- Size: 4.88 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Extract nationwide spatial data from OSM
Give the script a csv of key-value pairs, and return a csv of all matched to that key-value par for the entire US. Output contains WKT geometry field.
***
- Clone repo:
```{bash}
$ git clone https://github.com/simonkassel/us-osm-data/
```## Run from R IDE:
- Set working directory to local version of repo
- Source functions:
```{r}
source('get_osm.R')
```
- Place key-value csv in working directory
- Pull from OSM api and write to csv:
```{r}
csv_to_list(path = '[input csv file path]', keys = '[name of key field in csv]', values = '[name of value field in csv]', query = TRUE)
```
- Script will write output csv to working directory with modified filename of input dataset
- For more flexible functionality, check individual function documentation within Script## Run from command line
- Sample command
```{bash}
$ Rscript get_osm.R [input csv] [key field] [value field]
```
- Find output csv in same directory as input