This code will return 500 lines corresponding to SIRETs located in either Bourgogne-Franche-Comté or Île-de-France, and in one of the three sectors C, D or E.
Note that filtering on categorical variables that are not indexed in MongoDB leads to prohibitive fetching durations. This adds to the argument for either:
In the short run, indexing all categorical variables (there may only be five to ten of them...). To be discussed in a future issue
In the long run, switching to a database program other than MongoDB
Solves #39
A data scientist can now create an instance of SFDataset using keyword arguments to filter on one or more categories. For instance:
This code will return 500 lines corresponding to SIRETs located in either Bourgogne-Franche-Comté or Île-de-France, and in one of the three sectors C, D or E.
Note that filtering on categorical variables that are not indexed in MongoDB leads to prohibitive fetching durations. This adds to the argument for either: