codeforamerica / naics-api

Basic API to return NAICS codes and information
BSD 3-Clause "New" or "Revised" License
96 stars 55 forks source link

NAICS 2-digit codes that are ranges will break above & below retrieval #1

Open louh opened 11 years ago

louh commented 11 years ago

Examples:

http://naics-api.herokuapp.com/v0/q?year=2012&code=446199&above=1 (44-45 is the 2-digit, top level code, which is returned as null)

http://naics-api.herokuapp.com/v0/q?year=2012&code=31-33&above=1 (does not work)

http://naics-api.herokuapp.com/v0/q?year=2012&code=31&above=1 (works, but also returns the 31-33 entry)

louh commented 11 years ago

Some progress has been made here. Current issues:

http://naics-api.herokuapp.com/v0/q?year=2012&code=44-45&below=1

Expected: All NAICS codes that start with 44 or 45.

Returned: Nothing.

http://naics-api.herokuapp.com/v0/q?year=2012&code=44-45&above=1

Expected: Nothing.

Returned: Code 44-45, with two additional null entries.