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

Variable definition is not robust enough in case one column in Master dataset is missing #111

Open
leriomaggio opened this issue Sep 24, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@leriomaggio
Copy link
Member

If MasterDataset is missing the column mapped to a variable, the code will break as each variable accesses the corresponding data series (i.e. pd.Series) directly from master_dataset (which is a DataFrame).

Alternatively, a get method should be used, so that if the series is not there, the Variable won't be included in the generated data.json file.

(See backend.datasets.generate_json.py)

@leriomaggio leriomaggio self-assigned this Sep 24, 2021
@leriomaggio leriomaggio added bug Something isn't working new data source links or ideas for adding new data sources and removed new data source links or ideas for adding new data sources labels Sep 24, 2021
leriomaggio added a commit that referenced this issue Sep 24, 2021
…et removed

LA and LSOA counts are now constants in the module, so they can be easily changed.
Moreover, the `Dataset` class now includes two new Class Variables which are used to cache the (geo) dataframes of LA and LSOA data.
This should presumably reduce the time to load data from files.

Moreover, if a data source in Master Dataset is empty, it will be filtered out.
This is still to be handled properly when Variables are loaded (see #111)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant