The goal of pcodesOCHA is to scrap pcodes and geoJSON from UNOCHA Common Operational Datasets web server
While the package can be used as a standalone, the scraped files are available in output folder.
A Cron job runs once a month at 12:00 am to update the outputs thanks to github actions.
- all_pcodes : list all pcodes availables
- all_pcodes_feature_servers : legacy all_pcodes
- available_countries : list all available countries and their corresponding ISO 3 country code
- country_geojson_URL : scrape geoJSON for a country from URL
- country_geojson_iso3 : scrape geoJSON for a country from ISO 3 code
- country_pcodes_URL : scrape pcodes for a country from URL
- country_pcodes_iso3 : scrape pcodes for a country from ISO 3 code
- one_URL_geoJSON : scrape geoJSON from a specific URL for the API
- one_URL_properties : scrape properties (pcodes) from a specific URL for the API
the easiest way to use the data is probably by importing directly the data from the raw data in the folder output: - CSV : https://raw.githubusercontent.com/ElliottMess/pcodesOCHA/master/output/all_pcodes_20210112.csv
- JSON : https://raw.githubusercontent.com/ElliottMess/pcodesOCHA/master/output/all_pcodes_20210112.json
For instance to read it with readr: pcodes <- readr::read_csv(“https://raw.githubusercontent.com/ElliottMess/pcodesOCHA/master/output/all_pcodes_20210112.csv”)