• Stars
    star
    171
  • Rank 221,024 (Top 5 %)
  • Language
    JavaScript
  • Created about 12 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Javascript-based library for accessing the SODA2 API.

soda-js

A client implementation of the Socrata Open Data API in Coffeescript and Javascript.

Important Note

In order to access the SODA API via HTTPS, clients must now support the Server Name Indication extension to the TLS protocol. What does this mean? It means that if youโ€™re using soda-js, you must use a JavaScript VM that supports SNI:

Supported Operations

Supports both consumer and producer API, but does not currently support creating datasets or the import workflow.

Usage

See the sample/ directory for sample code, but hereโ€™s the general idea:

var soda = require('soda-js');

Consumer API

You can query a dataset by SODA2 clauses, or supply a custom SoQL query to be run.

var consumer = new soda.Consumer('explore.data.gov');

consumer.query()
  .withDataset('644b-gaut')
  .limit(5)
  .where({ namelast: 'SMITH' })
  .order('namelast')
  .getRows()
    .on('success', function(rows) { console.log(rows); })
    .on('error', function(error) { console.error(error); });

Using โ€˜likeโ€™ in a where clause:

.where("namelast like '%MITH'")

Producer API

You can add, update, replace, delete, and upsert rows, as well as truncate a dataset.

var producer = new soda.Producer('sandbox.demo.socrata.com', sodaConnectionOptions);

var data = { mynum : 42, mytext: "hello world" }

producer.operation()
  .withDataset('rphc-ayt9')
  .add(data)
    .on('success', function(row) { console.log(row); })
    .on('error', function(error) { console.error(error); })

License

Provided under the MIT license.

More Repositories

1

soda-ruby

A RubyGem for the Socrata Open Data API
Ruby
122
star
2

socrata-py

socrata data-pipeline python library
Python
87
star
3

datasync

Desktop / Console application for updating Socrata datasets automatically.
Java
76
star
4

soda-java

This is the Java API for the SODA 2.0 API
Java
70
star
5

soda-php

A simple library to make it easier to access SODA services from PHP
PHP
64
star
6

dev.socrata.com

Socrata Developer Site
Jupyter Notebook
61
star
7

soda-ios-sdk

Objective-C
47
star
8

soda-swift

SODA SDK for Apple's Swift programming language
Swift
46
star
9

soda-android-sdk

Java
35
star
10

opendatanetwork.com

The Open Data Network
JavaScript
19
star
11

soda-scala

Native Scala API for SODA2
Scala
17
star
12

shipyard

An open-sourced collection of docker images that probably don't merit their own git repo, but serve as building blocks or one-off utilities.
Dockerfile
12
star
13

connectors

ETL Tools and Templates
Python
11
star
14

discuss

Discuss all the things!
10
star
15

socrata-kettle

Socrata plug-in for Pentaho Kettle
Java
10
star
16

presentations

Presentations by @chrismetcalf at hackathons, conferences, and other Open Data events
HTML
9
star
17

odn-backend

Backend for the Open Data Network.
JavaScript
9
star
18

exkml

kml parser
Elixir
7
star
19

data-studio-connector

Google Data Studio connector to public Socrata dataset
JavaScript
7
star
20

labs-common-jekyll

HTML
6
star
21

snuffleupadata.com

Home of @socrata's mascot, Snuffleupadata
HTML
4
star
22

oauth_sample_app_ruby

A sample app to show how to connect to the Socrata Open Data API using the OAuth2 Rubygem
Ruby
4
star
23

python-release-plugin

A Python setuptools plugin to simplify the release process for Python modules
Python
4
star
24

cdc-indicator

Chronic Disease Indicator App
JavaScript
3
star
25

Socrata

Python
2
star
26

spark-etl-experiment

how to spend 2 days mostly waiting for sbt, reading tracebacks & desperately googling
Elm
2
star
27

cms-plan-finder-automation

Python-based workflow to automate daily release of CMS Plan Finder data
Python
2
star
28

thank-a-govie.com

Ruby
2
star
29

labs-common

Common resources for Jekyll web projects
JavaScript
2
star
30

eurybates

Consumer & producer library for many-to-many communication over ActiveMQ or Kafka
Scala
2
star
31

publishing_api_examples

Examples using Python and the sodapy library to publish and update datasets
Jupyter Notebook
2
star
32

kibana

Monitoring for the Elastic stack. Primary source can be found here: https://github.com/elastic/kibana
Shell
1
star
33

Socrata-PowerShell

PowerShell module for creating and updating datasets on a Socrata domain
PowerShell
1
star
34

arcs

A Python library for Assessing Relevance of our Catalog Search system.
Python
1
star
35

python-101

An introduction to programming using Python for non-engineers.
Python
1
star