feomike / slope

makes a bunch of data objects for time series line charts
1 stars 0 forks source link

Clean up json metadata #27

Closed awolfe76 closed 8 years ago

awolfe76 commented 8 years ago

Current

Currently file looks like (data shortened to highlight metadata):

{
    "layout": "bank-data",
    "description": "Bank Data",
    "title": "Financial Institution HMDA filings",
    "bank": "Quicken Loans",
    "type": "line",
    "categories": "chart",
    "data": {
        "years": [{
            "count": 0,
            "loan_amount": 0,
            "year": "1990"
        }]
    }
}

Remove

We can remove layout, description, title and categories for sure. We can probably remove type as well. For now these are all line charts. Later, if needed, we could reintroduce that field.

Add

We should add a loanType and a location. These are already known through the directory structure, but would be useful here as well to anyone just viewing a file.

Result

{
    "bank": "Quicken Loans",
    "loanType": "Single Family Origination",
    "location": "MD",
    "data": {
        "years": [{
            "count": 0,
            "loan_amount": 0,
            "year": "1990"
        }]
    }
}
feomike commented 8 years ago

done (might need minor clean up), but basically there.