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

PR: Refactoring of the tool to search for climate stations in the ECCC database. #82

Merged
merged 35 commits into from
Nov 15, 2017

Conversation

jnsebgosselin
Copy link
Owner

Fixes #71


As suggested by @xamal2, instead of searching for weather station directly on the ECCC website (http://climate.weather.gc.ca/historical_data/search_historic_data_e.html), we now use instead the information contained within a csv that is published by ECCC on its ftp Tor server (ftp://client_climate@ftp.tor.ec.gc.ca/Pub/Get_More_Data_Plus_de_donnees/).

The data contained in the csv is read, formatted and saved in binary format on the disk. This make searching for weather station almost instantaneous. It is not required to do this in another thread anymore, nor to use a progress bar.

search_stations

@jnsebgosselin
Copy link
Owner Author

jnsebgosselin commented Nov 10, 2017

Now that searching for station is very quick, the QTableWidget cannot keep up to refresh the display when there is a lot of stations. We will have to implement a custom QTableView with a custom QAbstractTableModel instead that will be more efficient.

Used the function defined in utils module instead
This is so it is importable more easily from other modules.
Reworked the GUI so it is more inline with how the search is performing
now. It is more filter oriented now than research oriented.
This will allow to keep track of index ordering in column 0 instead.
Since WeatherStationDisplayTable was not used anymore in
search_weather_data, it was moved to dwnld_weather_data where it is
still used.
Since everything is now so quick, there is no neeed for a search button
anymore and the station list can be updated live at runtime.
@jnsebgosselin
Copy link
Owner Author

jnsebgosselin commented Nov 15, 2017

And here is a demo of the result. No need to click on a search button anymore. Everything is updated automatically.

sear_for_station

@jnsebgosselin jnsebgosselin self-assigned this Nov 15, 2017
@jnsebgosselin jnsebgosselin added this to the gwhat-0.1 milestone Nov 15, 2017
@jnsebgosselin jnsebgosselin merged commit 6170a50 into master Nov 15, 2017
@jnsebgosselin jnsebgosselin deleted the improve_search_clim_stn branch November 15, 2017 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant