Git Product home page Git Product logo

carpentries-incubator / jupyter_maps Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 6.0 12.84 MB

Interactive Maps in the Jupyter Notebook

Home Page: https://carpentries-incubator.github.io/jupyter_maps/

License: Other

Makefile 0.01% HTML 99.92% R 0.01% Shell 0.01% Python 0.07% Ruby 0.01%
python ipyleaflet jupyter-notebook jupyterlab carpentries carpentryconnect carpentries-incubator lesson pre-alpha english

jupyter_maps's People

Contributors

abbycabs avatar brandoncurtis avatar brownsarahm avatar erinbecker avatar evanwill avatar fmichonneau avatar gvwilson avatar ianlee1521 avatar j34ni avatar jcoliver avatar jduckles avatar jpallen avatar jsta avatar katrinleinweber avatar mawds avatar maxim-belkin avatar mr-c avatar naught101 avatar neon-ninja avatar pbanaszkiewicz avatar pipitone avatar rgaiacs avatar sdruskat avatar synesthesiam avatar tkphd avatar tracykteal avatar trk9001 avatar twitwi avatar wclose avatar wking avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

jupyter_maps's Issues

embed_minimal_html fails

With Python 3.6.7 and having installed jupyter labextension install @jupyter-widgets/[email protected], using embed_minimal_html() results in the following error:

1 from ipywidgets.embed import embed_minimal_html
      2 
----> 3 embed_minimal_html('carpentries_instructors_basic.html', views=[map], title='The Carpentries Instructors')

~/anaconda3/envs/jupyter-maps/lib/python3.6/site-packages/ipywidgets/embed.py in embed_minimal_html(fp, views, title, template, **kwargs)
    300     {embed_kwargs}
    301     """
--> 302     snippet = embed_snippet(views, **kwargs)
    303 
    304     values = {

~/anaconda3/envs/jupyter-maps/lib/python3.6/site-packages/ipywidgets/embed.py in embed_snippet(views, drop_defaults, state, indent, embed_url, requirejs, cors)
    277     values = {
    278         'load': load.format(embed_url=embed_url, use_cors=use_cors),
--> 279         'json_data': escape_script(json.dumps(data['manager_state'], indent=indent)),
    280         'widget_views': widget_views,
    281     }

~/anaconda3/envs/jupyter-maps/lib/python3.6/json/__init__.py in dumps(obj, skipkeys, ensure_ascii, check_circular, allow_nan, cls, indent, separators, default, sort_keys, **kw)
    236         check_circular=check_circular, allow_nan=allow_nan, indent=indent,
    237         separators=separators, default=default, sort_keys=sort_keys,
--> 238         **kw).encode(obj)
    239 
    240 

~/anaconda3/envs/jupyter-maps/lib/python3.6/json/encoder.py in encode(self, o)
    199         chunks = self.iterencode(o, _one_shot=True)
    200         if not isinstance(chunks, (list, tuple)):
--> 201             chunks = list(chunks)
    202         return ''.join(chunks)
    203 

~/anaconda3/envs/jupyter-maps/lib/python3.6/json/encoder.py in _iterencode(o, _current_indent_level)
    428             yield from _iterencode_list(o, _current_indent_level)
    429         elif isinstance(o, dict):
--> 430             yield from _iterencode_dict(o, _current_indent_level)
    431         else:
    432             if markers is not None:

~/anaconda3/envs/jupyter-maps/lib/python3.6/json/encoder.py in _iterencode_dict(dct, _current_indent_level)
    402                 else:
    403                     chunks = _iterencode(value, _current_indent_level)
--> 404                 yield from chunks
    405         if newline_indent is not None:
    406             _current_indent_level -= 1

~/anaconda3/envs/jupyter-maps/lib/python3.6/json/encoder.py in _iterencode_dict(dct, _current_indent_level)
    402                 else:
    403                     chunks = _iterencode(value, _current_indent_level)
--> 404                 yield from chunks
    405         if newline_indent is not None:
    406             _current_indent_level -= 1

~/anaconda3/envs/jupyter-maps/lib/python3.6/json/encoder.py in _iterencode_dict(dct, _current_indent_level)
    402                 else:
    403                     chunks = _iterencode(value, _current_indent_level)
--> 404                 yield from chunks
    405         if newline_indent is not None:
    406             _current_indent_level -= 1

~/anaconda3/envs/jupyter-maps/lib/python3.6/json/encoder.py in _iterencode_dict(dct, _current_indent_level)
    402                 else:
    403                     chunks = _iterencode(value, _current_indent_level)
--> 404                 yield from chunks
    405         if newline_indent is not None:
    406             _current_indent_level -= 1

~/anaconda3/envs/jupyter-maps/lib/python3.6/json/encoder.py in _iterencode_list(lst, _current_indent_level)
    323                 else:
    324                     chunks = _iterencode(value, _current_indent_level)
--> 325                 yield from chunks
    326         if newline_indent is not None:
    327             _current_indent_level -= 1

~/anaconda3/envs/jupyter-maps/lib/python3.6/json/encoder.py in _iterencode(o, _current_indent_level)
    435                     raise ValueError("Circular reference detected")
    436                 markers[markerid] = o
--> 437             o = _default(o)
    438             yield from _iterencode(o, _current_indent_level)
    439             if markers is not None:

~/anaconda3/envs/jupyter-maps/lib/python3.6/json/encoder.py in default(self, o)
    178         """
    179         raise TypeError("Object of type '%s' is not JSON serializable" %
--> 180                         o.__class__.__name__)
    181 
    182     def encode(self, o):

TypeError: Object of type 'MetaHasTraits' is not JSON serializable

Including this lesson on the new community lessons page

@fmichonneau has updated the lesson template to enable support of Incubator lessons!

This update:

  • Creates a top-of-page banner to indicate that this lesson is in the incubator (and not an official Carpentries lesson). This banner is in addition to the existing "lesson life cycle" banner that appears on some official Carpentries lessons (for example the geospatial lessons) to indicate whether lessons are pre-alpha, alpha, beta, or stable.

  • Changes the license information to make it clear the copyright is not held by The Carpentries or any of its lesson programs.

  • Replaces The Carpentries (or SWC/DC/LC) logo in the upper left hand corner of the template with The Carpentries Incubator logo.

@fmichonneau and I are happy to do the heavy lifting of bringing this template into your lesson repository (or helping you with the logistics if you'd like to try it yourself). Once this has been done, your lesson will appear on a "Community Contributed Lessons" page on The Carpentries website!

Please respond to this issue to let us know if you approve these changes. Please also indicate whether you would prefer to pull in the template update yourself, or would prefer @fmichonneau and I to take the lead on that. Looking forward to posting your lesson publically and getting the word out about this awesome resource!

feedback from CarpentryConnect 2019 to improve material

I got very good tips on how to improve material:

nicer way to format the html string (without having to add + signs and loads of """ etc):
html = """


Instructors: {}



""".format(" ".join(instructors))

also if want to avoid for i in range(0, len(list)) can use for element in list, which iterates through list elements, eg 
for element in features:
    location = (element['geometry']['coordinates'][1],element['geometry']['coordinates'][0])

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.