Skip to content

Commit

Permalink
preparing for new release
Browse files Browse the repository at this point in the history
  • Loading branch information
betolink committed Oct 22, 2023
1 parent 4a9f9fe commit a9eadda
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 6 deletions.
18 changes: 18 additions & 0 deletions environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,27 @@ channels:
- conda-forge
dependencies:
- python=3.9.*
- jupyterlab
- mamba
- cartopy
- fiona
- geopandas
- ipyleaflet
- matplotlib-base
- pyproj
- ipympl
- pandas
- numpy
- s3fs
- sidecar
- shapely
- xarray
- markdown
- voila
- zarr
- pip
- pip:
- git+https://github.com/nasa-jpl/itslive-py.git
- utm
- pynvim
- "poetry>=1.2"
18 changes: 15 additions & 3 deletions notebooks/ITS_LIVE_plot_profile_timeseries.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,24 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"id": "98368f4f-42cc-4dcb-94ce-388f482de2e0",
"metadata": {
"tags": []
},
"outputs": [],
"outputs": [
{
"ename": "ModuleNotFoundError",
"evalue": "No module named 'itslive'",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn[1], line 3\u001b[0m\n\u001b[1;32m 1\u001b[0m get_ipython()\u001b[38;5;241m.\u001b[39mrun_line_magic(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mmatplotlib\u001b[39m\u001b[38;5;124m'\u001b[39m, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124minline\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[0;32m----> 3\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mitslive\u001b[39;00m\n\u001b[1;32m 4\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mpyproj\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m Transformer\n\u001b[1;32m 5\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mutm\u001b[39;00m\n",
"\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'itslive'"
]
}
],
"source": [
"%matplotlib inline\n",
"\n",
Expand Down Expand Up @@ -202,7 +214,7 @@
"use_logscale = False\n",
"\n",
"# year_min = 1985.0\n",
"year_min = 2013.0\n",
"year_min = 1985.0\n",
"year_max = 2023.1\n",
"\n",
"speed_min = 0\n",
Expand Down
24 changes: 22 additions & 2 deletions notebooks/voila/itslive-widget.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"\n",
"matplotlib.rcParams['figure.figsize'] = [8, 4]\n",
"matplotlib.rcParams[\"figure.autolayout\"] = True\n",
"matplotlib.pyplot.style.use('ggplot')\n",
"\n",
"matplotlib.pyplot.style.use('fast')\n",
"\n",
"velocity_widget = ITSLIVE()"
]
Expand Down Expand Up @@ -59,7 +60,26 @@
"id": "9595c701-f37b-45dc-868f-069483ce5b3f",
"metadata": {},
"outputs": [],
"source": []
"source": [
"# import numpy as np\n",
"\n",
"# import matplotlib.pyplot as plt\n",
"# import matplotlib.dates as pldates\n",
"\n",
"\n",
"# ax = velocity_widget.fig.axes[0]\n",
"\n",
"# # start, end = ax.get_xlim\n",
"\n",
"# loc = pldates.YearLocator() # this locator puts ticks at regular intervals\n",
"# ax.xaxis.set_major_locator(loc)\n",
"\n",
"# years = ax.get_xticklabels()\n",
"# for item in (years ):\n",
"# item.set_fontsize(7)\n",
"# ax.legend(fontsize=8)\n",
"# # ax.xaxis.set_major_formatter(ticker.FormatStrFormatter(''))\n"
]
}
],
"metadata": {
Expand Down
13 changes: 13 additions & 0 deletions notebooks/voila/velocity_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
import markdown
import numpy as np
import pandas as pd
import matplotlib.dates as pldates

# to get and use geojson datacube catalog
# for datacube xarray/zarr access
from IPython.display import display
Expand Down Expand Up @@ -983,6 +985,17 @@ def plot_time_series(self, *args, **kwargs):
self.fig.canvas.draw()
self.fig_h.tight_layout()
self.fig_h.canvas.draw()
self.ax.grid(axis='x')
# start, end = ax.get_xlim

loc = pldates.YearLocator() # this locator puts ticks at regular intervals
self.ax.xaxis.set_major_locator(loc)

years = self.ax.get_xticklabels()
for item in years:
item.set_fontsize(7)
self.ax.legend(fontsize=8)
self.ax.set_xlabel("Year")

self._control_plot_button.disabled = False
else:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "itslive"
homepage = "https://github.com/nasa-jpl/itslive-vortex"
version = "0.2.0"
version = "0.3.0"
description = "Python client for ITSLIVE gralcier velocity data"
authors = ["Luis Lopez <[email protected]>"]
license = "GNUL V3"
Expand Down

0 comments on commit a9eadda

Please sign in to comment.