Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write a unit test for pulling data from JSON #85

Closed
tomschenkjr opened this issue Feb 25, 2016 · 1 comment
Closed

Write a unit test for pulling data from JSON #85

tomschenkjr opened this issue Feb 25, 2016 · 1 comment
Assignees
Milestone

Comments

@tomschenkjr
Copy link
Contributor

tomschenkjr commented Feb 25, 2016

Need to ensure that posixify() worked both with csv and json files. Right now we're only testing CSV files.

@nicklucius
Copy link
Contributor

nicklucius commented Oct 7, 2016

Looks like posixify() expects dates in a different format than Socrata uses for JSON files.

Here are the two formats posixify() expects:

## Define regex patterns for short and long date formats, which are the two 
## formats that are supplied by Socrata. 
patternShort <- paste0("^[[:digit:]]{1,2}/[[:digit:]]{1,2}/[[:digit:]]{4}$")
patternLong <- paste0("^[[:digit:]]{1,2}/[[:digit:]]{1,2}/[[:digit:]]{4}","[[:digit:]]{1,2}:[[:digit:]]{1,2}:[[:digit:]]{1,2}","AM|PM","$")

Here's an example of patternLong: "09/14/2012 10:38:01 PM"

But the Socrata JSON download uses ISO 8601 dates like this: "2014-10-13T00:00:00.000"

https://dev.socrata.com/docs/datatypes/floating_timestamp.html#,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants