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

possible use case with prism #21

Open
sdtaylor opened this issue Apr 13, 2018 · 1 comment
Open

possible use case with prism #21

sdtaylor opened this issue Apr 13, 2018 · 1 comment

Comments

@sdtaylor
Copy link

It would be good if given a csv with lats and longs to be able to automagically extract various prism variables. For example, given a simple csv like

site_info.head()

    site_id   latitude   longitude
0       258  39.184269 -106.854614
1       414  44.277962  -70.315315
2       475  47.027077 -114.049248
3       637  44.340950  -72.461220
4       681  41.296783 -105.574600
5       703  37.576965 -106.100365
6       744  37.282257 -107.857346
7       844  39.864285 -105.100296
8      1020  39.699631 -105.263504
9      1524  45.339485  -92.913094
10     1526  48.065807 -122.144325
11     1597  48.054951  -92.765915
12     1598  48.051636  -92.766304
13     1657  39.603176 -105.071312

Then a possible invocation could be:

retriever.retrieve(locations = site_info, dataset='prism_daily_tmean', start_date='2015-07-01', end_date='2017-07-30')

and it returns a pandas dataframe like

    site_id   latitude   longitude  prism_daily_tmean
0       258  39.184269 -106.854614         6.28
1       414  44.277962  -70.315315         8.12
2       475  47.027077 -114.049248         5.30
3       637  44.340950  -72.461220         8.30
4       681  41.296783 -105.574600         9.85
5       703  37.576965 -106.100365         6.01
6       744  37.282257 -107.857346        10.43
7       844  39.864285 -105.100296        15.10
8      1020  39.699631 -105.263504        12.92
9      1524  45.339485  -92.913094        10.83
10     1526  48.065807 -122.144325         6.84
11     1597  48.054951  -92.765915         5.82
12     1598  48.051636  -92.766304         5.82
13     1657  39.603176 -105.071312        13.61

(Note I just made this up, I don't know what is setup already)

@ethanwhite
Copy link
Member

👍 👍

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

No branches or pull requests

2 participants