socrata

SODA between operator does not work with some datasets

我是研究僧i 提交于 2021-02-11 10:40:52
问题 The between operator works for some Socrata SODA datasets and not for others. When used on certain datasets the query yields no results, but on other datasets it works as expected. What am I doing wrong? Instead of using between I tried using >= which did yield results. Also, I tried using between on a different dataset which worked as expected. For example, using between on the :updated_at field in this query yields no results. curl "https://data.cityofnewyork.us/resource/3h2n-5cm9.json?

SODA between operator does not work with some datasets

笑着哭i 提交于 2021-02-11 10:40:13
问题 The between operator works for some Socrata SODA datasets and not for others. When used on certain datasets the query yields no results, but on other datasets it works as expected. What am I doing wrong? Instead of using between I tried using >= which did yield results. Also, I tried using between on a different dataset which worked as expected. For example, using between on the :updated_at field in this query yields no results. curl "https://data.cityofnewyork.us/resource/3h2n-5cm9.json?

Using Socrata SODA API to query most recent rows by datetime

前提是你 提交于 2021-02-10 09:27:07
问题 I am new to this site and this is my first question. I am trying to query the "Seattle Real Time Fire 911 Calls" database from the Socrata Seattle Open Data site: https://data.seattle.gov/Public-Safety/Seattle-Real-Time-Fire-911-Calls/kzjm-xkqj. I'm not an expert at using the SODA API, and I'm having difficulty figuring out how to query the most recent entries in the database. All attempts to use the "order" or "where" SoQL statements give me data from 2010 or 2011, and I cannot figure out

Need help pulling JSON data with RSocrata from a website API

偶尔善良 提交于 2020-04-18 05:49:23
问题 I need help drafting code that pulls public data directly from a website that is in Socrata format. Here is a link: https://data.cityofchicago.org/Administration-Finance/Current-Employee-Names-Salaries-and-Position-Title/xzkq-xp2w There is an API endpoint: https://data.cityofchicago.org/resource/xzkq-xp2w.json After the data is uploaded, null values in the "Annual Salary" should be replaced with 50000. 回答1: We can use the RSocrata package library(RSocrata) url <- "https://data.cityofchicago

Socrata distance_in_meters(…) returns errors even on 2.1 endpoint

北战南征 提交于 2019-12-25 07:25:48
问题 When I make a query from the CMS Nursing Home Compare data and attempt to order using distance_in_meters(...) I get the following error: Error: function distance_in_meters is not defined in SoQL. The docs say distance_in_meters(...) works with the 2.1 endpoint (further information on endpoints are stuck in a redirect loop from the link at the top of that page at the time of this writing but you can get it from Google cache): https://dev.socrata.com/docs/functions/distance_in_meters.html I

Does the Socrata SODA API provide a last modified date for a table?

て烟熏妆下的殇ゞ 提交于 2019-12-24 21:25:59
问题 On the web portal, every dataset has a last modified date, however I don't see anything in the API docs (or the response for that matter). Am I missing something? 回答1: Another place you can find this information is the the /data.json API available on all Socrata-powered sites. For example, http://data.seattle.gov/data.json This lists every dataset on the site along with metadata such as last modified date. 回答2: Found it in the header! Surprise, it's "Last-Modified" Access-Control-Allow-Origin

requesting data from the Center for Disease Control using RSocrata or XML in R

淺唱寂寞╮ 提交于 2019-12-12 04:29:45
问题 My goal is to obtain a time series from 1996 week 1 to week 46 of 2016 of legionellosis cases from this website supported by the Center for Disease Control (CDC) of the United States. A coworker attempted to scrape only tables that contain legionellosis cases with the code below: #install.packages('rvest') library(rvest) ## Code to get all URLS getUrls <- function(y1,y2,clist){ root="https://wonder.cdc.gov/mmwr/mmwr_1995_2014.asp?mmwr_year=" root1="&mmwr_week=" root2="&mmwr_table=2" root3="

Update a Socrata dataset using app token and private in HTTP basic

房东的猫 提交于 2019-12-12 01:19:40
问题 I'm trying to write a script to update metadata on various datasets, using an authorized app. Using OAuth seems like the wrong approach (it's not a web-facing application for other users to use as themselves), and passing my own user name and password seems...icky. The SODA API authentication documentation is pretty confusing: All HTTP-basic-authenticated requests must be performed over a secure (https) connection, and should include an application token, which is obtained when you register

I am trying to display some data from Socrata using Soda API and got the following message **Error “0” from server:**

夙愿已清 提交于 2019-12-11 22:55:00
问题 I am trying to display some data from Socrata using Soda API and got the following message Error "0" from server: What does this mean? This is my code: $socrata = new Socrata("https://data.medicare.gov", $app_token); $params = array("\$where" => "starts_with(zip, $model->zipcode)"); $response = $socrata->get("/resource/aeay-dfax.json",$params); ?> <?= Html::encode($model->zipcode) ?> <h2>Results</h2> <?# Create a table for our actual data ?> <table border="1"> <tr> <th>Last Name</th> <th

Is there a Socrata API for reading a site's catalog?

旧城冷巷雨未停 提交于 2019-12-11 02:23:18
问题 Is there a Socrata API for reading a site's catalog of datasets? For example, for Boston, is there an API equivalent of this page? 回答1: Try this https://data.cityofboston.gov/data.json That should have every dataset in JSON format. 回答2: There is also a (beta) API available for catalog reading/searching, which may be easier to filter/parse than the data.json file (but either would work!). You can find information about this here: http://labs.socrata.com/docs/search.html. 来源: https:/