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

Kristoff #1

Open
wants to merge 2 commits into
base: gh-pages
Choose a base branch
from
Open

Kristoff #1

wants to merge 2 commits into from

Conversation

kristoffPotgieter
Copy link
Collaborator

Hi i've added some amenity measures which are causing bugs. Modifications a
have been made to import_amenities.py and calib_main_function.py

new amenity measures are included to the code here
I added data related to additional amenities and modified the appropriate functions.
Copy link
Collaborator

@TLMonnier TLMonnier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is my review:

  • I don't know what you changed in calib_nb.ipynb, but a priori it is not needed to touch anything there
  • Ok to displace the variable selection from calib_main_func.py if you prefer. Note that, in principle, the variables_regression variable should be defined as a list (not an Index)
  • Nothing to declare on import_amenities.py, the bug does not come from there.

Actually, if you read the error message more carefully, you'll see that the bug does not come from calling the import_exog_amenities function to define the amenities_sp variable, but lower in the calib_main_func.py script, when defining the amenities_grid variable. The reason is simply that the file grid_amenities.csv does not exist!

Indeed, you need the data at the SP level to estimate the amenity effects (this works), but then you also need the covariates at the grid level to be able to map the amenity score at the grid level, as is done in the calib_nb.ipynb script. If you want, there's a function called gen_small_areas_to_grid in the data.py module that would allow you to do that (although I have not tested it for that purpose, so you can also do the disaggregation yourself if you prefer).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants