internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: holoviz/hvplot

Issue:
Should coastline=True automatically trigger geo=True if crs is not specified?
```
import xarray as xr

ds = xr.tutorial.open_dataset('air_temperature')
ds.hvplot('lon', 'lat', coastline=True)
```
When I set coastline=True, I expect to see a coastline, but this isn't the case.


Discussion:
Right. I think `coastline` should. But then they are different from `tiles` which don't require geoviews, so shouldn't set `geo=True` (probably?).
I agree that tiles probably shouldn't set geo=True since it's a holoviews thing, but coastline I think is a geoviews exclusive so coastline -> geo=True

Resolving patch:
diff --git a/hvplot/converter.py b/hvplot/converter.py
--- a/hvplot/converter.py
+++ b/hvplot/converter.py
@@ -312,7 +312,7 @@ def __init__(self, data, x, y, kind=None, by=None, use_index=True,
         self.value_label = value_label
         self.group_label = group_label
         self.dynamic = dynamic
-        self.geo = geo or crs or global_extent or projection or project
+        self.geo = any([geo, crs, global_extent, projection, project, coastline])
         self.crs = self._process_crs(data, crs) if self.geo else None
         self.project = project
         self.coastline = coastline


Test patch:
diff --git a/hvplot/tests/testgeo.py b/hvplot/tests/testgeo.py
--- a/hvplot/tests/testgeo.py
+++ b/hvplot/tests/testgeo.py
@@ -73,6 +73,13 @@ def test_plot_with_coastline(self):
         coastline = plot.get(1)
         self.assertIsInstance(coastline, gv.Feature)
 
+    def test_plot_with_coastline_sets_geo_by_default(self):
+        import geoviews as gv
+        plot = self.df.hvplot.points('x', 'y', coastline=True)
+        self.assertEqual(len(plot), 2)
+        coastline = plot.get(1)
+        self.assertIsInstance(coastline, gv.Feature)
+
     def test_plot_with_coastline_scale(self):
         plot = self.df.hvplot.points('x', 'y', geo=True, coastline='10m')
         opts = plot.get(1).opts.get('plot')
Repository: holoviz/hvplot

Issue:
allow color_key an alias for cmap
The ability to pass cmap dicts through to datashader color_key was solved in the fix for #267, but it may be good to also accept `color_key` as an argument. See https://discourse.holoviz.org/t/keyed-color-map-for-image/505.

BTW, @jsignell mentioned in the fix the need to think about the legend ... which would be great to have too.


Discussion:
That seems like a reasonable suggestion. Would you be willing to open a PR?
Maybe. Can you can point me to an example of the pythonic way to alias a kwarg, one that changes the documentation correctly too?
Cool! You'll want to mimic what's going on with `colormap` in this file: https://github.com/holoviz/hvplot/blob/master/hvplot/converter.py

Resolving patch:
diff --git a/hvplot/converter.py b/hvplot/converter.py
--- a/hvplot/converter.py
+++ b/hvplot/converter.py
@@ -235,7 +235,8 @@ class HoloViewsConverter(object):
                      'min_height', 'min_width', 'frame_height', 'frame_width',
                      'aspect', 'data_aspect', 'fontscale']
 
-    _style_options = ['color', 'alpha', 'colormap', 'fontsize', 'c', 'cmap']
+    _style_options = ['color', 'alpha', 'colormap', 'fontsize', 'c', 'cmap',
+                      'color_key']
 
     _op_options = ['datashade', 'rasterize', 'x_sampling', 'y_sampling',
                    'aggregator']
@@ -794,10 +795,12 @@ def _process_style(self, kwds, plot_opts):
         style_opts.update(**{k: v for k, v in kwds.items() if k in valid_opts})
 
         # Color
-        if 'cmap' in kwds and 'colormap' in kwds:
-            raise TypeError("Only specify one of `cmap` and `colormap`.")
+        cmap_kwds = {'cmap', 'colormap', 'color_key'}.intersection(kwds)
+        if len(cmap_kwds) > 1:
+            raise TypeError('Specify at most one of `cmap`, `colormap`, or '
+                            '`color_key`.')
 
-        cmap = kwds.pop('cmap', kwds.pop('colormap', None))
+        cmap = kwds[cmap_kwds.pop()] if cmap_kwds else None
         color = kwds.pop('color', kwds.pop('c', None))
 
         if color is not None:


Test patch:
diff --git a/hvplot/tests/testoperations.py b/hvplot/tests/testoperations.py
--- a/hvplot/tests/testoperations.py
+++ b/hvplot/tests/testoperations.py
@@ -100,6 +100,9 @@ def test_aspect_and_frame_height_with_datashade_and_dynamic_is_false(self, opt):
     def test_cmap_can_be_color_key(self):
         color_key = {'A': '#ff0000', 'B': '#00ff00', 'C': '#0000ff'}
         self.df.hvplot.points(x='x', y='y', by='category', cmap=color_key, datashade=True)
+        with self.assertRaises(TypeError):
+            self.df.hvplot.points(x='x', y='y', by='category', datashade=True,
+                                  cmap='kbc_r', color_key=color_key)
 
     def test_when_datashade_is_true_set_hover_to_false_by_default(self):
         plot = self.df.hvplot(x='x', y='y', datashade=True)
Repository: holoviz/hvplot

Issue:
Entrypoint broken
The setup.py specifies `hvplot.__main__` as a console_script but that doesn't actually exist.


Discussion:

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -217,9 +217,7 @@ def package_assets(example_path):
     extras_require=extras_require,
     tests_require=extras_require['tests'],
     entry_points={
-        'console_scripts': [
-            'hvplot = hvplot.__main__:main'
-        ],
+        'console_scripts': [],
         'pandas_plotting_backends': [
             'holoviews = hvplot:plotting',
         ],


Test patch:
Repository: holoviz/hvplot

Issue:
Using a string (instead of list) raises misleading AttributeError on hover_cols in hvplot
Issue related to this discourse [topic](https://discourse.holoviz.org/t/using-a-string-instead-of-list-raises-misleading-attributeerror-on-hover-cols-in-hvplot/1137)



Discussion:

Resolving patch:
diff --git a/hvplot/converter.py b/hvplot/converter.py
--- a/hvplot/converter.py
+++ b/hvplot/converter.py
@@ -758,6 +758,8 @@ def _process_data(self, kind, data, x, y, by, groupby, row, col,
             self.hover_cols = self.variables
         elif hover_cols == 'all' and not self.use_index:
             self.hover_cols = [v for v in self.variables if v not in self.indexes]
+        elif hover_cols !='all' and isinstance(hover_cols,str):
+            self.hover_cols = [hover_cols]
 
         if self.datatype in ('geopandas', 'spatialpandas'):
             self.hover_cols = [c for c in self.hover_cols if c!= 'geometry']


Test patch:
Repository: holoviz/hvplot

Issue:
limits for contourf: clim
having the same problem as https://discourse.holoviz.org/t/how-to-set-clim-for-hvplot-quadmesh/150. didnt find the related issue, therefore raise it here


#### ALL software version info
hvplot.util.hv_version: LooseVersion ('1.13.3')

#### Description of expected behavior and the observed behavior

holoviews.QuadMesh (also contourf) has the clims argument; but clims and clim do not work for my in hvplot, therefore color axis limits change for each timestep when doing groupby

#### Complete, minimal, self-contained example code that reproduces the issue

```
import xarray as xr
rasm=xr.tutorial.load_dataset('rasm')
# clim ignored, limits change for each timestep
rasm.hvplot(kind='contourf',x='xc',y='yc',z='Tair',groupby='time', levels=40,cmap='RdBu_r',clim=(-15,15))
# works
rasm.hvplot(kind='contourf',x='xc',y='yc',z='Tair',groupby='time', levels=40,cmap='RdBu_r').opts(clim=(-15,15))
```

#### Stack traceback and/or browser JavaScript console output

#### Screenshots or screencasts of the bug in action
<img width="858" alt="image" src="https://user-images.githubusercontent.com/12237157/87934849-387c6800-ca90-11ea-85df-e26c575981e0.png">




Discussion:

Resolving patch:
diff --git a/hvplot/converter.py b/hvplot/converter.py
--- a/hvplot/converter.py
+++ b/hvplot/converter.py
@@ -1821,6 +1821,7 @@ def contour(self, x=None, y=None, z=None, data=None, filled=False):
         levels = self.kwds.get('levels', 5)
         if isinstance(levels, int):
             opts['color_levels'] = levels
+        opts['clim'] = self._dim_ranges['c']
         return contours(qmesh, filled=filled, levels=levels).opts(**opts)
 
     def contourf(self, x=None, y=None, z=None, data=None):


Test patch:
Repository: holoviz/hvplot

Issue:
`hvplot.util.with_hv_extension` hides docstrings
#### ALL software version info

  * hvplot = 0.7.0

However looking at the source code this issue should still be present in MASTER.

#### Description of expected behavior and the observed behavior
Functions wrapped with the `hvplot.util.with_hv_extension` decorator have their docstrings hidden by the `wrapper` docstring.

[`functools.wraps`](https://docs.python.org/3/library/functools.html#functools.wraps) can fix this.

#### Complete, minimal, self-contained example code that reproduces the issue

Example
```Python
>>> import hvplot
>>> help(hvplot.scatter_matrix)
```

Result:

```
Help on function wrapper in module hvplot.util:

wrapper(*args, **kwargs)
```

This is the docstring from the `wrapper` function inside `hvplot.util.with_hv_extension`.


Discussion:

Resolving patch:
diff --git a/hvplot/util.py b/hvplot/util.py
--- a/hvplot/util.py
+++ b/hvplot/util.py
@@ -6,6 +6,7 @@
 import sys
 
 from distutils.version import LooseVersion
+from functools import wraps
 from types import FunctionType
 
 import pandas as pd
@@ -24,6 +25,7 @@
 
 def with_hv_extension(func, extension='bokeh', logo=False):
     """If hv.extension is not loaded, load before calling function"""
+    @wraps(func)
     def wrapper(*args, **kwargs):
         if extension and not getattr(hv.extension, '_loaded', False):
             hv.extension(extension, logo=logo)


Test patch:
Repository: holoviz/hvplot

Issue:
hvPlotExplorer issues with Fields pane
Some issues I have noticed when working with the Fields pane of the hvPlotExplorer.

Code used:
``` python
import hvplot.ui
import hvplot.pandas
import panel as pn
pn.extension()

from bokeh.sampledata import penguins

df = penguins.data
hvplot.ui.hvPlotExplorer(df)
```
### 1. Some kinds only show questionsmark in HoverTools
Kinds are `area`, `density`, and `violin`

![ Screenshot 2022-07-22 14 11 51](https://user-images.githubusercontent.com/19758978/180436879-d3b85e86-4f4e-4061-8c62-22e7f1aab34f.png)

### 2. Changing y to `index` as the first thing raises an exception that is not caught.

https://user-images.githubusercontent.com/19758978/180437152-de647b60-2833-4efa-a524-bae11657595b.mp4

### 3. Kind=`errorbars` fails with `Dimension 2 not found`

![image](https://user-images.githubusercontent.com/19758978/180437830-9ee55b9b-2aa6-40e6-9f1c-914b26249c5d.png)

### 4. Kind=`heatmap` collapses the UI

https://user-images.githubusercontent.com/19758978/180438111-8bcf375e-2941-4ec3-80e4-b0d191e2e576.mp4






Discussion:
### Point 1
Not related to Explorer but a Holoviews problem, as I can get it to work with a Bokeh.

https://user-images.githubusercontent.com/19758978/181917501-499270b6-c34a-4b19-a6da-f3ea1a653ef0.mp4


``` python
import holoviews as hv
from bokeh.models import HoverTool

hv.extension("bokeh")

hover = HoverTool(tooltips=[("x", "@x"), ("y", "@{y}")])
hv.Area((range(100), range(100))).opts(tools=[hover])


from bokeh.plotting import figure, show
from bokeh.models import HoverTool, ColumnDataSource

source = ColumnDataSource(dict(x=range(100),y=range(100)))

p = figure(width=300, height=300)
p.varea(x='x', y1=0, y2='y', source=source)
p.add_tools(hover)
show(p)
```

Resolving patch:
diff --git a/hvplot/ui.py b/hvplot/ui.py
--- a/hvplot/ui.py
+++ b/hvplot/ui.py
@@ -348,17 +348,25 @@ def __init__(self, df, **params):
             pn.layout.HSpacer(),
             sizing_mode='stretch_both'
         )
-        self._plot()
         self.param.trigger('kind')
 
     def _populate(self):
         variables = self._converter.variables
+        indexes = getattr(self._converter, "indexes", [])
+        variables_no_index = [v for v in variables if v not in indexes]
         for pname in self.param:
             if pname == 'kind':
                 continue
             p = self.param[pname]
             if isinstance(p, param.Selector):
-                p.objects = variables
+                if pname == "x":
+                    p.objects = variables
+                else:
+                    p.objects = variables_no_index
+
+                # Setting the default value
+                if pname == "x" or pname == "y":
+                    setattr(self, pname, p.objects[0])
 
     def _plot(self, *events):
         self._layout.loading = True


Test patch:
Repository: holoviz/hvplot

Issue:
Enable me to set explorer defaults/ initial values
## Request

Enable me to provide defaults, initial values to `hvplot.explorer`.

```python
hvplot.explorer(df, kind=`bar`, x="name", legend='top')
```

## Motivation

If I have a little bit of insights into my data I might already know sensible defaults/ initial values. Its just friction if I have to navigate 3 dropdowns to set the values in the example above if I use the explorer for that type of data over and over again.

## Additional Ideas

It would be very, very powerful if I could provide an existing hvplot to the explorer and it used its settings as a starting point. I might just want to finish of an existing hvplot quickly by quickly changing the `alpha` or `rot`.


Discussion:
Ahh. This is already possible to set the initial argumets, but its just not clear from the docstring. 

I will **change my request** to make the docstring more clear.

![image](https://user-images.githubusercontent.com/42288570/187348223-496e2016-d475-43b9-a925-5411963b1ed4.png)


Resolving patch:
diff --git a/hvplot/ui.py b/hvplot/ui.py
--- a/hvplot/ui.py
+++ b/hvplot/ui.py
@@ -30,21 +30,36 @@
 
 
 def explorer(data, **kwargs):
-    """Explore your data by building a plot in a Panel UI component.
+    """Explore your data and design your plot via an interactive user interface.
 
-    This function returns a Panel component that has on the right-side
-    hand a plot view and on the left-side hand a number of widgets that
-    control the plot.
+    This function returns an interactive Panel component that enable you to quickly change the
+    settings of your plot via widgets. 
+    
+    Reference: https://hvplot.holoviz.org/getting_started/explorer.html
 
     Parameters
     ----------
     data : pandas.DataFrame
         Data structure to explore.
+    kwargs : optional
+        Arguments that `data.hvplot()` would also accept like `kind='bar'`.
 
     Returns
     -------
     hvplotExporer
-        Panel component to explore a dataset.
+        Panel component to explore the data and design your plot.
+
+    Example
+    -------
+
+    >>> import hvplot.pandas
+    >>> import pandas as pd
+    >>> df = pd.DataFrame({"x": [1, 2, 3], "y": [1, 4, 9]})
+    >>> hvplot.explorer(df)
+    
+    You can also specify initial values
+
+    >>> hvplot.explorer(df, kind='bar', x='x')
     """
     return hvPlotExplorer.from_data(data, **kwargs)
 


Test patch:
Repository: holoviz/hvplot

Issue:
Make it easier to plot distributions of categorical data
Trying to contribute to pythonplot.com during the PyData Global 2022 I realized that it might be difficult for users to figure out how to plot a distribution of a categorical variable.

hvPlot (and Pandas) follows the definition of *histogram*: A histogram is an approximate representation of the [distribution](https://en.wikipedia.org/wiki/Frequency_distribution) of **numerical** data.

![image](https://user-images.githubusercontent.com/42288570/205346494-d2158852-8ee6-4f33-aade-e47556395076.png)

Plotly on the other hand does not care about that. They just make it easy to plot for their users 

![image](https://user-images.githubusercontent.com/42288570/205346422-70217c7b-8bd4-4593-a1ec-132779d0c6d2.png)

We should also make this easier for our users. We could

- Point out in the histogram reference guide that a histogram is only for numerical data.
- Provide an example of a distribution plot for categorical variable
- Document this in docstrings
- Improve the error message if the user provides a categorical variable. It is really, really hard to understand the error message right now.

Or maybe just support categorical parameters in `.hvplot.hist`.


Discussion:

Resolving patch:
diff --git a/hvplot/plotting/core.py b/hvplot/plotting/core.py
--- a/hvplot/plotting/core.py
+++ b/hvplot/plotting/core.py
@@ -1244,7 +1244,7 @@ def violin(self, y=None, by=None, **kwds):
 
     def hist(self, y=None, by=None, **kwds):
         """
-        A `histogram` displays an approximate representation of the distribution of numerical data.
+        A `histogram` displays an approximate representation of the distribution of continous data.
 
         Reference: https://hvplot.holoviz.org/reference/pandas/hist.html
 
@@ -1252,6 +1252,7 @@ def hist(self, y=None, by=None, **kwds):
         ----------
         y : string or sequence
             Field(s) in the *wide* data to compute the distribution(s) from.
+            Please note the fields should contain continuous data. Not categorical.
         by : string or sequence
             Field(s) in the *long* data to group by.
         bins : int, optional
@@ -1295,6 +1296,20 @@ def hist(self, y=None, by=None, **kwds):
             df['two'] = df['one'] + np.random.randint(1, 7, 6000)
             df.hvplot.hist(bins=12, alpha=0.5, color=["lightgreen", "pink"])
 
+        If you want to show the distribution of the values of a categorical column,
+        you can use Pandas' method `value_counts` and `bar` as shown below
+
+        .. code-block::
+
+            import hvplot.pandas
+            import pandas as pd
+
+            data = pd.DataFrame({
+                "library": ["bokeh", "plotly", "matplotlib", "bokeh", "matplotlib", "matplotlib"]
+            })
+
+            data["library"].value_counts().hvplot.bar()
+
         References
         ----------
 


Test patch:
Repository: holoviz/hvplot

Issue:
Positional arguments to `.polygons`
I am in the pysal tutorial and noticed that the in matplotlib the positional arg on `gdf.plot` maps to the `c` arg. In hvplot _I think_ it maps to `x` but it seems like it gets dropped. 

It seems to me that the only positional argument should be `c` OR positional arguments should not be allowed at all. 

![image](https://user-images.githubusercontent.com/4806877/178532370-18a9595f-bad3-47c6-8070-6739316d2731.png)


Discussion:

Resolving patch:
diff --git a/hvplot/converter.py b/hvplot/converter.py
--- a/hvplot/converter.py
+++ b/hvplot/converter.py
@@ -706,6 +706,10 @@ def _process_data(self, kind, data, x, y, by, groupby, row, col,
                     kind = 'polygons'
                 elif geom_type in ('LineString', 'LineRing', 'Line'):
                     kind = 'paths'
+            # if only one arg is provided, treat it like color
+            if x is not None and y is None:
+                kwds['color'] = kwds.pop('color', kwds.pop('c', x))
+                x = None
         elif isinstance(data, pd.DataFrame):
             datatype = 'pandas'
             self.data = data


Test patch:
diff --git a/hvplot/tests/testgeo.py b/hvplot/tests/testgeo.py
--- a/hvplot/tests/testgeo.py
+++ b/hvplot/tests/testgeo.py
@@ -261,6 +261,13 @@ def test_points_hover_cols_index_in_list(self):
         assert points.kdims == ['x', 'y']
         assert points.vdims == ['index']
 
+    def test_points_hover_cols_positional_arg_sets_color(self):
+        points = self.cities.hvplot('name')
+        assert points.kdims == ['x', 'y']
+        assert points.vdims == ['name']
+        opts = hv.Store.lookup_options('bokeh', points, 'style').kwargs
+        assert opts['color'] == 'name'
+
     def test_points_hover_cols_with_c_set_to_name(self):
         points = self.cities.hvplot(c='name')
         assert points.kdims == ['x', 'y']
Repository: holoviz/hvplot

Issue:
Rasterized and projected RGB plot very slow or hanging
Running the code from https://github.com/holoviz/hvplot/issues/1104 on the main branch is either very very slow or hanging on my laptop:

```python
import hvplot.xarray
import rioxarray as rxr

# Downloaded from: https://oin-hotosm.s3.amazonaws.com/5d7dad0becaf880008a9bc88/0/5d7dad0becaf880008a9bc89.tif
cog_url = "/home/shh/Downloads/5d7dad0becaf880008a9bc89.tif"
da = rxr.open_rasterio(cog_url)
plot = da.hvplot.rgb(x="x", y="y", rasterize=True, projection="Robinson")
plot
```


Discussion:

Resolving patch:
diff --git a/hvplot/converter.py b/hvplot/converter.py
--- a/hvplot/converter.py
+++ b/hvplot/converter.py
@@ -407,6 +407,7 @@ def __init__(
         self.dynamic = dynamic
         self.geo = any([geo, crs, global_extent, projection, project, coastline, features])
         self.crs = self._process_crs(data, crs) if self.geo else None
+        self.output_projection = self.crs
         self.project = project
         self.coastline = coastline
         self.features = features
@@ -585,7 +586,7 @@ def __init__(
         if self.crs and global_extent:
             plot_opts['global_extent'] = global_extent
         if projection:
-            plot_opts['projection'] = process_crs(projection)
+            plot_opts['projection'] = self.output_projection
         title = title if title is not None else getattr(self, '_title', None)
         if title is not None:
             plot_opts['title'] = title
@@ -1264,10 +1265,8 @@ def method_wrapper(ds, x, y):
 
         if self.crs and self.project:
             # Apply projection before rasterizing
-            import cartopy.crs as ccrs
-            from geoviews import project
-            projection = self._plot_opts.get('projection', ccrs.GOOGLE_MERCATOR)
-            obj = project(obj, projection=projection)
+            import geoviews as gv
+            obj = gv.project(obj, projection=self.output_projection)
 
         if not (self.datashade or self.rasterize or self.downsample):
             layers = self._apply_layers(obj)
@@ -1362,10 +1361,6 @@ def method_wrapper(ds, x, y):
             if self._dim_ranges.get('c', (None, None)) != (None, None):
                 style['clim'] = self._dim_ranges['c']
 
-        if self.geo and self.crs != self.output_projection:
-            import geoviews as gv
-            obj = gv.project(obj, projection=self.output_projection)
-
         processed = operation(obj, **opts)
 
         if self.dynspread:


Test patch:
diff --git a/hvplot/tests/testgeo.py b/hvplot/tests/testgeo.py
--- a/hvplot/tests/testgeo.py
+++ b/hvplot/tests/testgeo.py
@@ -140,6 +140,7 @@ def test_geo_with_rasterize(self):
             rasterize=True,
             dynamic=False,
             aggregator="max",
+            project=True,
         )
 
         p1 = gv.Points(ds.isel(time=0), kdims=["lon", "lat"], crs=ccrs.PlateCarree())
Repository: ckan/ckan

Issue:
Anonymous users can edit resources
There is an issue with the auth system that anonymous users can edit resources even if they are not allowed to create them. 



Discussion:

Resolving patch:
diff --git a/ckan/logic/auth/update.py b/ckan/logic/auth/update.py
--- a/ckan/logic/auth/update.py
+++ b/ckan/logic/auth/update.py
@@ -15,9 +15,16 @@ def package_update(context, data_dict):
     package = get_package_object(context, data_dict)
 
     if package.owner_org:
+        # if there is an owner org then we must have update_dataset
+        # premission for that organization
         check1 = new_authz.has_user_permission_for_group_or_org(package.owner_org, user, 'update_dataset')
     else:
-        check1 = new_authz.check_config_permission('create_dataset_if_not_in_organization')
+        # If dataset is not owned then we can edit if config permissions allow
+        if new_authz.auth_is_registered_user():
+            check1 = new_authz.check_config_permission(
+                'create_dataset_if_not_in_organization')
+        else:
+            check1 = new_authz.check_config_permission('anon_create_dataset')
     if not check1:
         return {'success': False, 'msg': _('User %s not authorized to edit package %s') % (str(user), package.id)}
     else:


Test patch: