opendata / Hunting-and-Fishing

Rendering hunting and fishing regulations as open data. [RETIRED]
MIT License
17 stars 3 forks source link

Reduce hunting date nesting? #36

Closed waldoj closed 10 years ago

waldoj commented 10 years ago

This seems way over-nested:

"seasons": {
    "season": {
        "method": "firearm",
        "range": {
            "statewide": {
                "season": {
                    "date": {
                        "starts": "2013-07-01",
                        "ends": "2014-06-30"
                    }
                }
            }
        }
    }

Shouldn't date be up a couple of levels, as a child of range? Isn't seasonsseason → [...] → season overspecified?

waldoj commented 10 years ago

The idea here is to group together time-bound elements. In addition to date ranges, there can be days (e.g., crows: "days": ["Monday", "Wednesday", "Friday", "Saturday"]), or times. Realistically, the best that we can do is eliminate the season container (in the above example, it's a child of statewide).

But, really, this example looks pretty different now, in light of #34. At the moment, it looks like this:

"seasons": {
    "season": {
        "method": "firearm",
        "range": {
            "1": {
                "places": {
                    "Virginia": {
                        "gnis_id": "TK",
                        "fips_code": "TK"
                    }
                },
                "season": {
                    "date": {
                        "starts": "2013-07-01",
                        "ends": "2014-06-30"
                    }
                }
            }
        }
    }
}

I think it's a good idea to break up the range data into place restrictions and time restrictions, and I think that season is probably the most sensible terminology to use there. While I think this looks overspecified for simple species (e.g., possum), I think it's appropriate for bear, deer, etc.

I'm going to close this without making any changes.