cyipt / acton

Active Transport Options for New Developments
https://cyipt.github.io/acton/
GNU General Public License v3.0
3 stars 2 forks source link

dev website is down causing vignette to fail #69

Closed Robinlovelace closed 3 years ago

Robinlovelace commented 3 years ago

I see this when running devtools::check():

E> Error: processing vignette 'case-studies.Rmd' failed with diagnostics:
E> Cannot open "https://dev.planit.org.uk/api/applics/geojson?limit=500&bbox=&end_date=2021-01-04&start_date=2000-02-01&pg_sz=500&auth=Leeds&app_size=large&app_state=permitted"; The file doesn't seem to exist.
E> --- failed re-building ‘case-studies.Rmd’
E> 
E> --- re-building ‘indicators.Rmd’ using rmarkdown
E> tmap mode set to interactive viewing
E> --- finished re-building ‘indicators.Rmd’
E> 
E> --- re-building ‘the-acton-project.Rmd’ using rmarkdown
E> tmap mode set to interactive viewing
E> Quitting from lines 278-285 (the-acton-project.Rmd) 
E> Error: processing vignette 'the-acton-project.Rmd' failed with diagnostics:
E> Cannot open "https://dev.planit.org.uk/api/applics/geojson?limit=500&bbox=&end_date=2021-01-04&start_date=2000-02-01&pg_sz=500&auth=Leeds&app_size=large&app_state=permitted"; The file doesn't seem to exist.

It seems that this is now down:

https://dev.planit.org.uk/api/applics/geojson?limit=500&bbox=&end_date=2021-01-04&start_date=2000-02-01&pg_sz=500&auth=Leeds&app_size=large&app_state=permitted

But this works:

https://planit.org.uk/api/applics/geojson?limit=500&bbox=&end_date=2021-01-04&start_date=2000-02-01&pg_sz=500&auth=Leeds&app_size=large&app_state=permitted

Quick question @aspeakman, are all dev endpoints down and is the API stable and future proof (will ensure we don't call it directly for testing if not)?

aspeakman commented 3 years ago

The dev site can't be relied on as I change it all the time, so yes please switch to www.planit.org.uk

Robinlovelace commented 3 years ago

Cheers Andrew, job done and updated in the docs: https://cyipt.github.io/acton/reference/get_planit_data.html

On that note if you see any part of the API not exposed in that function, please let us know and feel free to open up a new issue.

FYI we're planning to document work on actdev on this site for now.

Cheers!

aspeakman commented 3 years ago

In the function definition you have mentioned 'krad' for the radius of a circle search with 'pcode' as the centre but you can also define the centre directly using 'lat and 'lng'

There is also a 'bounds' parameter where you can supply a boundary polygon but not sure if that is of use

aspeakman commented 3 years ago

Sorry the parameter is called 'boundary'not 'bounds'

Also there may be a gotcha with the 'limit' parameter - 500 is the default limit but the default page size 'pg_sz' is 50, so you could set a limit of 100 but only get a max of 50 results.

If you dont want users to deal with paged results and are happy to accept an absolute max of 500 results (the maximum page size). Then its best to set a fixed 'limit' of 500 and use the 'pg_sz' as the effective limit on results returned