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

poi weights #500

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

poi weights #500

wants to merge 15 commits into from

Conversation

joeytalbot
Copy link
Contributor

No description provided.

Copy link
Contributor

@Robinlovelace Robinlovelace left a comment

Choose a reason for hiding this comment

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

Looks like a great starter for 10. Any ideas of data on n. trips to supermarkets vs different trip attractors? Would assume that supermarkets, which are open most of the time, would generate more trips than markets, for example.

@joeytalbot
Copy link
Contributor Author

Looks like a great starter for 10. Any ideas of data on n. trips to supermarkets vs different trip attractors? Would assume that supermarkets, which are open most of the time, would generate more trips than markets, for example.

Both will vary hugely. There will be more trips to Kirkgate Market than to a random Sainsburys. But other markets could be small.

@Robinlovelace
Copy link
Contributor

Are there any ways to estimate the size of supermarkets/markets I wonder? Cc @dabreegster who has thought about this for A/B Street demand model, any suggestions very welcome.

@dabreegster
Copy link

https://github.com/arup-group/osmox might have ideas. I've never tried this, but always wondered about using building footprint's area along with some local knowledge of different chains/brands. Interested if y'all find anything useful!

@Robinlovelace
Copy link
Contributor

I think building footprint should be quick win.

Copy link
Contributor

@Robinlovelace Robinlovelace left a comment

Choose a reason for hiding this comment

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

Would be good to see before/after visuals of the impact of these changes before merging.

@joeytalbot
Copy link
Contributor Author

POIs from categories given weight > 1:
poi weights edinburgh

@Robinlovelace
Copy link
Contributor

Error message:

✖ errored target od_leisure
✖ errored pipeline [4.001 seconds]
Error:
! Error running targets::tar_make()
Error messages: targets::tar_meta(fields = error, complete_only = TRUE)
Debugging guide: https://books.ropensci.org/targets/debugging.html
How to ask for help: https://books.ropensci.org/targets/help.html
Last error message:
    ℹ In argument: `poi_weights = case_when(...)`.
Caused by error in `case_when()`:
! Failed to evaluate the left-hand side of formula 1.
Caused by error:
! object 'classname' not found

@Robinlovelace
Copy link
Contributor

Debugging code below:

@@ -33,6 +33,8 @@ make_od = function(oas, os_pois, grid, purpose, trip_purposes, zones, parameters
os_pois = sf::st_join(os_pois, grid, join = sf::st_nearest_feature)

# calculate weighting of each grid point
browser()
os_pois
Copy link
Contributor

Choose a reason for hiding this comment

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

Browser() used to debug objects at this point. Clear the issue from this: the column is lacking and that's due to a previous step that removed the classname column:

os_pois
Simple feature collection with 52137 features and 2 fields
Geometry type: POINT
Dimension:     XY
Bounding box:  xmin: 195991 ymin: 530348 xmax: 397421.6 ymax: 675769
Projected CRS: OSGB36 / British National Grid
First 10 features:
     ref_no grid_id                  geom
1  18218308   34397 POINT (287405 612972)
2  18219911   42816 POINT (309823 624984)
3  18219916   43515 POINT (304793 626017)
4  18219917   42097 POINT (303311 623852)
5  18219918   43870 POINT (304837 626270)
6  18219919   43155 POINT (302152 625568)
7  18219920   43155 POINT (302164 625422)
8  18219921   44222 POINT (302712 626908)
9  18220720   67719 POINT (316984 657013)
10 18220730   67280 POINT (319049 656495)

@joeytalbot
Copy link
Contributor Author

It does include shops within shopping centres, so I've removed the weighting for shopping centres
shopping centres

Copy link
Contributor

@Robinlovelace Robinlovelace left a comment

Choose a reason for hiding this comment

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

Good QA. Will merge after we have results from #514 so we can clearly assess before/after impact.

@Robinlovelace
Copy link
Contributor

Plan: @wangzhao0217 to rebuild for all regions before/after change with July routes and look at any differences in route network results for utility trips.

Copy link
Contributor

@Robinlovelace Robinlovelace left a comment

Choose a reason for hiding this comment

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

Looks good 👍

@Robinlovelace
Copy link
Contributor

Note: we should merge this after not too long...

@joeytalbot
Copy link
Contributor Author

Note: we should merge this after not too long...

Can it be merged now?

@Robinlovelace
Copy link
Contributor

Yes but I want to sort out #524 first.

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.

3 participants