Austin
Crime
DOWNLOAD_URL='https://data.austintexas.gov/resource/fdj4-gpfu.json'
URLPARAMS='
$where=rep_date%20between%20%272022-01-01T12:00:00%27%20and%20%272023-01-01T14:00:00%27
&$order=rep_date&$select=rep_date,crime_type,location_type,address,rep_time,zip_code
&$limit=2000
&$offset=100
'
curl ${DOWNLOAD_URL}?${URLPARAMS//[^[:print:]]/}
${VAR//[^[:print:]]/}
removes new lines
Traffic
Los Angeles
Crime
https://data.lacity.org/resource/2nrs-mtv8.json?$limit=10
- About: https://data.lacity.org/Public-Safety/Crime-Data-from-2020-to-Present/2nrs-mtv8
- View: https://data.lacity.org/api/views/2nrs-mtv8/
ODATA
- List all the datasets available for a domain
sandbox.demo.socrata.com/OData.svc/
- Retrieve all the items in a particular dataset
nimj-3ivp
- Retrieve one item, by identifier
nimj-3ivp(16)
- Retrieving a particular field within the item
nimj-3ivp(16)/depth/$value
- OrderBy Query option
?$orderby=magnitude
- Top Query option
?$top=2
- Skip Query Option
?$skip=1005
- Filter Query Option
?$filter=magnitude%20gt%205
- Select Query Option
?$select=magnitude,depth
- InlineCount Query Option
?$filter=magnitude%20gt%205&$inlinecount=allpages
- Querying using OData
- Paging -
$limit
and$offset
- Queries using SODA -
$select
,$where
,$order
,$group
, …