ropensci / weathercan

R package for downloading weather data from Environment and Climate Change Canada
https://docs.ropensci.org/weathercan
GNU General Public License v3.0
102 stars 29 forks source link

Low precision of latitude and longitude reported for stations. #82

Closed AreliaTW closed 4 years ago

AreliaTW commented 4 years ago

This is a very useful and nicely written package. Thank you for creating it.

The location of the stations is important in my work and I noticed that the latitude and longitude are only reported to two decimal places:

stations_search("VICTORIA GONZALES CS")$lat [1] 48.41 48.41 48.41 stations_search("VICTORIA GONZALES CS")$lon [1] -123.32 -123.32 -123.32

On the climate.weather.gc.ca site for the VICTORIA GONZALES CS station the UTM coordinates are as follows: Latitude:48°24'47.896" N Longitude:123°19'29.192" W

Converted to decimal degrees with 5 digits after the decimal the station location would be: 48.41306, 123.32472

Unless I've missed something and it is possible to list the latitude and longitude with more precision, could you tell me if there a way to update weathercan to increase the precision to 5 decimals? Perhaps the truncated decimal degree values are a function of the process for scrapping the website or converting them?

Thank you. Arelia

boshek commented 4 years ago

👋 @AreliaTW

To me this look like data source issue that is beyond the scope of weathercan. The data that weathercan uses is here:

ftp://client_climate@ftp.tor.ec.gc.ca/Pub/Get_More_Data_Plus_de_donnees/Station%20Inventory%20EN.csv

As you can see the coordinates are only reported to the precision you see in the R package. AFAIK that is our best reproducible source for stations so that is unlikely to change any time soon. Though ECCC reported coordinates with greater precision, weathercan does not actually scrape the data from ECCC and rather uses their APIs to properly collect data from the agency. I don't think that moving towards this being a scraping package is a particularly good idea as it requires considerable more effort to maintain.

AreliaTW commented 4 years ago

@boshek Thanks for clarify the source of the data. I understand that scraping data is more work and hard to maintain. Do you know who I could contact at ECCC that might be able to address this issue? I.e. produce the metadata table with more precision?

steffilazerte commented 4 years ago

The web portal for downloading data is here (with an example). If you scroll to the bottom there is a "Feedback" button where you send in suggestions and find some contact information.

I'm not sure ECCC will want to release that data publically, but depending on your project, they might be willing the share the lat/lon data with you personally. Then you could use weathercan to download the data and just supplement with the lat/lon information you have.

Good luck!

AreliaTW commented 4 years ago

Thanks for this suggestion. I've sent an email to 'ec.services.climatiques-climate.services.ec@canada.ca'. The automatic reply included "Please be advised that due to unforeseen circumstances, you will experience a longer than usual response time for your service request." I'll let you know if I hear anything.