All Projects → CityofSantaMonica → Soda.net

CityofSantaMonica / Soda.net

Licence: mit
A Socrata Open Data API (SODA) client library for .NET

Labels

Projects that are alternatives of or similar to Soda.net

Open Data
Free football data from StatsBomb
Stars: ✭ 891 (+1682%)
Mutual labels:  open-data
Us Polling Places
Standardized data on historical general election polling places in the United States.
Stars: ✭ 34 (-32%)
Mutual labels:  open-data
Doathon
Our discussion forum (see "issues") for the OpenCon Do-A-Thon, a day of trying, making, testing and doing to advance Open Research & Education. See our full website, with more information (including Github Help, and how to get involved).
Stars: ✭ 45 (-10%)
Mutual labels:  open-data
Atd Data And Performance
Open data and performance hub for the City of Austin Transportation Department
Stars: ✭ 17 (-66%)
Mutual labels:  open-data
Mapboard
A framework for data-rich web mapping 🌎📊✨
Stars: ✭ 29 (-42%)
Mutual labels:  open-data
Gtfs Tripify
Turn GTFS-RT transit updates into historical arrival data.
Stars: ✭ 36 (-28%)
Mutual labels:  open-data
Soda Profile
The installation profile for SODA distribution
Stars: ✭ 6 (-88%)
Mutual labels:  open-data
Urbansprawl
Open framework for calculating spatial urban sprawl indices and performing disaggregated population estimates using open data
Stars: ✭ 48 (-4%)
Mutual labels:  open-data
Omx
Open Matrix (OMX)
Stars: ✭ 32 (-36%)
Mutual labels:  open-data
Covid19 Brazil Timeseries
Data collection to analyze the dissemination of COVID-19 through Brazilian states. Contributions are welcome.
Stars: ✭ 43 (-14%)
Mutual labels:  open-data
European Transport Modules
[DISCONTINUED in favour of public-transport-operators] Collection of european transport JavaScript modules.
Stars: ✭ 9 (-82%)
Mutual labels:  open-data
Dcat Ap
This is the issue tracker for the maintenance of DCAT-AP
Stars: ✭ 28 (-44%)
Mutual labels:  open-data
Us Senate
117th United States Senate - View Contact Information for United States Senators, including: Phone Number, Mailing Address, Official Website, Twitter & Facebook Accounts.
Stars: ✭ 37 (-26%)
Mutual labels:  open-data
Decidim
The participatory democracy framework. A generator and multiple gems made with Ruby on Rails
Stars: ✭ 894 (+1688%)
Mutual labels:  open-data
Parkendd
🚗 iOS app for finding public parking lots
Stars: ✭ 45 (-10%)
Mutual labels:  open-data
Skdata
Python tools for data analysis
Stars: ✭ 16 (-68%)
Mutual labels:  open-data
Py Sec Edgar
Python application used to download, parse, and extract filings from the SEC Edgar Database (including 10-K, 10-Q, 13-D, S-1, 8-K, etc.)
Stars: ✭ 35 (-30%)
Mutual labels:  open-data
Onedata
Onedata is a distributed data management platform providing eventually consistent, POSIX-compliant virtual filesystem.
Stars: ✭ 49 (-2%)
Mutual labels:  open-data
Vbb Modules
List of JavaScript modules for Berlin & Brandenburg public transport.
Stars: ✭ 47 (-6%)
Mutual labels:  open-data
Digeds cat
This research seeks to examine best practice in the field of digital editions by collating relevant evidence in a detailed catalogue of extant digital projects.
Stars: ✭ 40 (-20%)
Mutual labels:  open-data

SODA.NET Build status

A Socrata Open Data API (SODA) client library targeting .NET 4.5 and above.

Getting Started

SODA.NET is available as a NuGet package.

dotnet add package CSM.SodaDotNet

Usage examples

Simple, read-only access

//initialize a new client
//make sure you register for your own app token (http://dev.socrata.com/register)
var client = new SodaClient("data.smgov.net", "REPLACE_WITH_YOUR_APP_TOKEN");

//read metadata of a dataset using the resource identifier (Socrata 4x4)
var metadata = client.GetMetadata("1234-wxyz");
Console.WriteLine("{0} has {1} views.", metadata.Name, metadata.ViewsCount);

//get a reference to the resource itself
//the result (a Resouce object) is a generic type
//the type parameter represents the underlying rows of the resource
var dataset = client.GetResource<Dictionary<string, object>>("1234-wxyz");

//of course, a custom type can be used as long as it is JSON serializable
var dataset = client.GetResource<MyClass>("1234-wxyz");

//Resource objects read their own data
var allRows = dataset.GetRows();
var first10Rows = dataset.GetRows(10);

//collections of an arbitrary type can be returned
//using SoQL and a fluent query building syntax
var soql = new SoqlQuery().Select("column1", "column2")
                          .Where("something > nothing")
                          .Group("column3");

var results = dataset.Query<MyOtherClass>(soql);

SodaClient is also capable of performing write operations

//make sure to provide auth credentials!
var client = 
    new SodaClient("data.smgov.net", "AppToken", "[email protected]", "password");

//Upsert some data serialized as CSV
string csvData = File.ReadAllText("data.csv");
client.Upsert(csvData, SodaDataFormat.CSV, "1234-wxyz");

//Upsert a collection of serializable entities
IEnumerable<MyClass> payload = GetPayloadData();
client.Upsert(payload, "1234-wxyz");

Note: This library supports writing directly to datasets with the Socrata Open Data API. For write operations that use data transformations in the Socrata Data Management Experience (the user interface for creating datasets), use the Socrata Data Management API. For more details on when to use SODA vs the Socrata Data Management API, see the Data Management API documentation

Build

Compilation can be done using Visual Studio Community Edition.

You can also use the .NET CLI:

git clone [email protected]:CityofSantaMonica/SODA.NET.git SODA.NET
cd SODA.NET
dotnet build

Tests

NUnit was used to build and run the test projects.

Run tests from the Visual Studio Test Explorer, or using the .NET CLI:

dotnet test

Contributing

Check out the Contributor Guidelines for more details.

Copyright and License

Copyright 2019 City of Santa Monica, CA

Licensed under the MIT License

Thank you

A tremendous amount of inspiration for this project came from the following projects. Thank you!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].