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

Need a method to feed case independent station names to data gathering functions #63

Open
boshek opened this issue Nov 27, 2017 · 1 comment

Comments

@boshek
Copy link
Collaborator

boshek commented Nov 27, 2017

Use case: if you are given a station name without a station number, what is the workflow to turn that into data? Can use the search* functions but that breaks down if there are >1 stations.

@paleolimbot
Copy link
Contributor

For another time, but I solved this in rclimateca using a "sanitizer" function for locations and a search function (along with a geocoded search, which might be more useful at times).

library(rclimateca)

ec_climate_search_locations("kentville")
#> Search results for ec_climate_search_locations(
#>   query = "kentville"
#> ) 
#> [1] KENTVILLE CDA NS 6375     KENTVILLE CDA CS NS 27141
ec_climate_geosearch_locations("kentville, NS")
#> Search results for ec_climate_geosearch_locations(
#>   query = "kentville, NS"
#> ) 
#>  [1] KENTVILLE CDA NS 6375 / 1.5 km        
#>  [2] KENTVILLE CDA CS NS 27141 / 1.5 km    
#>  [3] SOUTH ALTON NS 6470 / 2.9 km          
#>  [4] SHEFFIELD MILLS NS 6467 / 5.7 km      
#>  [5] HELLS GATE NS 6363 / 6.7 km           
#>  [6] CANNING NS 6311 / 8.7 km              
#>  [7] WHITE ROCK NS 6507 / 9.6 km           
#>  [8] CAMBRIDGE STATION NS 6309 / 9.9 km    
#>  [9] WOLFVILLE NS 6513 / 10.1 km           
#> [10] SHARPE BROOK IHD NS 6464 / 12.4 km    
#> [11] WATERVILLE CAMBRIDGE NS 6497 / 12.6 km
#> [12] HOLLOW BRIDGE NS 6364 / 12.6 km       
#> [13] SOUTH MOUNTAIN NS 26969 / 15.9 km     
#> [14] HALL'S HARBOUR NS 6359 / 16.7 km      
#> [15] BERWICK NS 7105 / 18.5 km             
#> [16] GARLAND NS 6351 / 22.9 km             
#> [17] SUMMERVILLE NS 6484 / 25.2 km         
#> [18] WINDSOR FALMOUTH NS 6509 / 26.2 km    
#> [19] WINDSOR FALMOUTH NS 6510 / 27.8 km    
#> [20] MARTOCK 35M NS 49109 / 29.9 km        
#> ...plus 8723 more

as_ec_climate_location("kentville cda cs")
#> <ec_climate_location>
#> [1] KENTVILLE CDA CS NS 27141
as_ec_climate_location("kentville cda ns")
#> <ec_climate_location>
#> [1] KENTVILLE CDA NS 6375

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

No branches or pull requests

2 participants