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 to update the readme file to install cartopy #96

Closed
Harish-2003 opened this issue Mar 13, 2024 · 2 comments
Closed

Need to update the readme file to install cartopy #96

Harish-2003 opened this issue Mar 13, 2024 · 2 comments

Comments

@Harish-2003
Copy link

from gliderpy.fetchers import GliderDataFetcher
from matplotlib import pyplot as plt
from gliderpy.plotters import plot_track
glider_grab = GliderDataFetcher()

glider_grab.fetcher.dataset_id = "whoi_406-20160902T1700"
df = glider_grab.to_pandas()
df.head()
plot_track(df)

while writing this code it was showing an error like this

ModuleNotFoundError                       Traceback (most recent call last)
[<ipython-input-5-f1542db75b39>](https://localhost:8080/#) in <cell line: 3>()
      1 from gliderpy.fetchers import GliderDataFetcher
      2 from matplotlib import pyplot as plt
----> 3 from gliderpy.plotters import plot_track
      4 glider_grab = GliderDataFetcher()
      5 

1 frames
[/usr/local/lib/python3.10/dist-packages/gliderpy/plotters.py](https://localhost:8080/#) in <module>
      6 
      7 try:
----> 8     import cartopy.crs as ccrs
      9     import matplotlib.dates as mdates
     10     import matplotlib.pyplot as plt

ModuleNotFoundError: No module named 'cartopy'

and i think it would be better if we would update the readme file by adding

pip install cartopy
@ocefpaf
Copy link
Member

ocefpaf commented Mar 14, 2024

@Harish-2003 I don't want to add any plotting instructions until the end of GSoC b/c:

  1. the code is in fux
  2. we wil change how we handle optional packages in gliderpy

With that said, let's leave this issue open to remind us to address this in the near future.

@ocefpaf
Copy link
Member

ocefpaf commented Jul 4, 2024

We should make cartopy to be an optional dependency. Closing this one in favor of #117.

@ocefpaf ocefpaf closed this as completed Jul 4, 2024
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