Closed BenGalewsky closed 9 years ago
Awesome--thanks, Ben. Working on it right now.
Hi Ben,
Unfortunately, these files aren't valid JSON (they won't parse). The data either needs to be formatted as an array of objects (starting and ending with brackets, not braces), like:
[
{"YEAR":2007,"BUSINESS_TYPE":"Grocery","ACCESS1_MAX":37.377845800546446,"COMM_AREA_ID":0,"ACCESS2":5.335669052053427,"ACCESS2_MIN":0.9230817978958219,"ACCESS2_MAX":16.481470664418474,"ACCESS1_MIN":12.874009784419938,"ACCESS1":22.009635576068447,"COMMUNITY_AREA":"OHARE"},
...
]
Or, _better yet_, create a single, dictionary object (starting and ending with a brace) by making the community area field a property in the object, like:
{
"OHARE" : {"YEAR":2007,"BUSINESS_TYPE":"Grocery","ACCESS1_MAX":37.377845800546446,"COMM_AREA_ID":0,"ACCESS2":5.335669052053427,"ACCESS2_MIN":0.9230817978958219,"ACCESS2_MAX":16.481470664418474,"ACCESS1_MIN":12.874009784419938,"ACCESS1":22.009635576068447},
...
}
Secondly, JSON is annoyingly strict about not allowing superfluous commas at the end of lists. Be sure the last item in the array (or the last property in the dictionary) is not followed by a comma.
The same issues apply to the critical business files, but, in addition, I notice that some of those files are essentially blank (ostensibly because no businesses quality as being critical). For these situations, the file should contain either an empty array []
or an empty object {}
.
Hi Matt --
I created an initial set of the static JSON files for you to consume. I did the best I could for reformatting the business license types to be friendly filename.
Let's see if you can consume these!
Ben