Introduction

This application supports the ability to export datasets using JSON, XML, and CSV. JSON and XML allow open and programmatic access to the datasets published in this data portal. JSON and XML data exports are given one page at a time and paging support is available and simple. CSV exports retrieve the entire dataset.

^ Back to the Top

Data Format

Data export uses a JSON data format, specifically an Array of JSON objects. Each row will contain an _id unique identifier, which can be used to ensure uniqueness. For example:

[{"col1":"Value for Column 1, Row 1","col2":"Value for Column 2, Row 1","_id":1},
{"col1":"Value for Column 1, Row 2","col2":"Value for Column 2, Row 2","_id":2}]

Alternatively one can also export data using XML. For example:

<list>
	<map>
		<entry key="col1">Value for Column 1, Row 1</entry>
		<entry key="col2">Value for Column 2, Row 1</entry>
		<entry key="_id">1</entry>
	</map>
	<map>
		<entry key="col1">Value for Column 1, Row 2</entry>
		<entry key="col2">Value for Column 2, Row 2</entry>
		<entry key="_id">2</entry>
	</map>
</list>
^ Back to the Top

Paging through Results

Offset

Results are presented 20 rows at a time. Use of the offset query parameter will offset the results by the given row count. For example, the following will shift the results by 20 rows, which is the same as "giving you page 2".

http://riversideca.gov/dataset/json/1?offset=20

The following will shift the results by 10,000 rows.

http://riversideca.gov/dataset/json/1?offset=10000

Max

By default results are presented 20 rows per page. Use of the max query parameter allows the export of more than 20 rows of data per page. The current limit is max=100.

http://riversideca.gov/dataset/json/1?max=100

Offset and Max

offset and max can be paired together, like so:

http://riversideca.gov/dataset/json/1?offset=10000&max=100
^ Back to the Top