New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

mapbox-data-cli

Package Overview
Dependencies
Maintainers
37
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mapbox-data-cli

download and upload mapbox data as geojson

latest
npmnpm
Version
2.0.0
Version published
Maintainers
37
Created
Source

mapbox-data-cli

build status

NPM

CLI utilities for Mapbox Data API.

Install

$ npm install -g mapbox-data-cli

Setup

Requires a MapboxAccessToken environment variable with data:write permissions.

Utilities

Includes nine utilities

  • mapbox-data get-dataset: read information about a particular dataset
  • mapbox-data get-feature: get individual feature from dataset
  • mapbox-data create-dataset: create a new empty dataset with optional name and description
  • mapbox-data insert-features: add/update features in a dataset
  • mapbox-data replace-dataset: replace dataset with new GeoJSON data
  • mapbox-data list-datasets: list all datasets belonging to a user
  • mapbox-data list-features: get all GeoJSON features within a dataset
  • mapbox-data delete-feature: delete a feature from within a dataset
  • mapbox-data delete-dataset: delete an entire dataset
$ npm install -g mapbox-data-cli
$ mapbox-data create-dataset "Traffic Data" "Traffic data for Phoenix area"
{"owner":"smith","id":"6dcc766430756d74120b9e5ff1c9d4dd","name":"Traffic Patterns,","description":"Traffic in the Pheonix Valley","created":"2015-08-05T02:35:59.828Z","modifie$
":"2015-08-05T02:35:59.828Z"}
$ mapbox-data insert-features 6dcc766430756d74120b9e5ff1c9d4dd traffic.json

The output of the list, insert, and replace commands are line-delimited JSON objects of each feature. If you would like to have the JSON object of the whole FeatureCollection, use the --dump option.

Pipes

mapbox-data insert-features and mapbox-data replace-dataset support stdin: you can pipe into them, and they'll put the data on Mapbox.

$ npm install -g geojson-random # util that generates random geojson
$ geojson-random | mapbox-data insert-features DATASETID

Keywords

mapbox

FAQs

Package last updated on 05 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts