villares, to python Portuguese
@villares@pynews.com.br avatar
villares,
@villares@ciberlandia.pt avatar

@villares #matplotlib is cool, but I don't think it is good to make interactive stuff with it, #pygame is cool but interaction with #py5 that inherits its setup/draw/events structure from #Processing, to me, feels even easier. Maybe it is because I'm so used to it... Anyway, check the code for this shapely exploration above and make your own conclusions!

piko, (edited ) to random German
@piko@chaos.social avatar

How do you feel about matplotlib?

silmaril,
@silmaril@chaos.social avatar

@piko
It's hard to get to the point of knowing what you're doing in , because they obfuscated a very well-structured API with lots of high level methods that keep breaking the API layers all the time.

It's easy to get almost the result you want. And usually it's a complete rebuild from scratch to get from this point to a good result.

If you manage.to get to the point where everything is done with low level methods, tweaking gets quite easy and efficient.

villares, to maps
@villares@ciberlandia.pt avatar

Despite my recent absolute failure with , here we go again:

Dear toot-pals, where can I find wholesome learning materials on and/or / / in ?

I've been playing with via , which is awesome , but I struggle with simple stuff like adding a bunch of places as markers. Everything looks a bit like the owl drawing meme, either showing something too easy and useless, or something too advanced and also useless or beyond my comprehension. Maybe some other Python tools?
(I know about Marcelo's fabulous PrettyMaps but it is not exactly a viz tool)

ZorzalErrante,

@villares Hi, this is the repository I use to teach visualization and in my daily vis. work: https://github.com/zorzalerrante/aves Although it is mostly in Spanish and it is not easy to grasp, it has lots of maps using and . I hope it helps.

LisaHornung, to python
@LisaHornung@fosstodon.org avatar

Did you know that you can create stunning tables in Python? 🔢 📊

I used data on Highest Paid Athletes to explore Plottable - an awesome library to customise tables. Really like the inbuilt graph options and how easy it is to display images. 🤩

🔗 Full code behind this graph: https://github.com/Lisa-Ho/small-data-projects?tab=readme-ov-file#012024-highest-paid-athletes
🔗 Official docs with great examples: https://plottable.readthedocs.io/en/latest/

nedbat, to jupyter
@nedbat@hachyderm.io avatar

I have a notebook with interactive widgets that worked a few years ago, and now complains "No artists with labels found to put in legend." I am a newb and don't know what I'm doing wrong. The last cell has the error: https://github.com/nedbat/broken-notebook/blob/main/Simplifed_Retirement.ipynb

villares, to python
@villares@ciberlandia.pt avatar

I know can do cartography (maps), and uses it to plot stuff, but I can't find documentation or a decent tutorial to plot a base map and a list of latlong places as different sized circles. I'm struggling with , in theory a wrapper to make mapping easier :((
Is it that hard or I'm just too dumb and/or I'm making everything wrong?

christof, to python
@christof@fedihum.org avatar

So far, I really like the (relatively) new -oriented interface for , one of my favorite libraries in .

It feels much cleaner, more logical, more compact, and there is indeed less need to go down to for many tweaks to a plot.

Documentation here: https://seaborn.pydata.org/tutorial/objects_interface.html

Code and result for a very simple bar chart example below. Quite compact and very clean.

Barplot resulting from the code shown in the first image. Six light blue bars of differing height. Most prevalent number of co-editors is 2, with 37.9 percent.

LisaHornung, to maps
@LisaHornung@fosstodon.org avatar

After weeks of making for the 30DayMapChallenge, it's time for some again.

Looked at what words C-3PO uses most often together (bigram analysis) and visualised them in a network graph (thicker line=more co-occurences). "Oh dear" 😃

Based on Star Wars scripts for episodes 1-6. Made with using , , and .

🔗 Code: https://github.com/Lisa-Ho/small-data-projects/blob/main/2023/2312-starwars-what-XY-says/starwars-what-XY-says.ipynb

LisaHornung, to python
@LisaHornung@fosstodon.org avatar

Day29 – Population (and Dot)

Change in population of London 1990-2020 per 1skm. Growth almost everywhere but largest in East London. Unsurprising considering new developments around Stratford (ie. Olympics) and other areas in East since then.

Made in , inspired by Jacques Bertin
🔗https://github.com/Lisa-Ho/30-day-map-challenge/blob/main/2023/Day29-population/population.ipynb

mgorny, to gentoo Polish
@mgorny@pol.social avatar

Za sprawą zlecenia z , Inc. (@cJ), sporo paczek Pythona w dorobiła się wsparcia , m.in.: , Notebook, , , .

Chciałbym także podziękować autorom PyPy za ich wsparcie, zarówno w kwestii poprawiania błędów w PyPy, jak również udzielaniu pomocy innym projektom, by poprawić ich zgodność z PyPy. Praca z wami jest przyjemnością!

Na koniec, poznałem ważny argument za pracą nad wsparciem PyPy w projektach: nawet jeśli dana paczka nie działa szybciej na PyPy, to może być zależnością w większym projekcie, w którym PyPy ogółem przynosi lepszą wydajność.

LisaHornung, to python
@LisaHornung@fosstodon.org avatar

Day14 – Europe.

Forest area per country. 🌳🌲Was surprised to see such a low number in Iceland, apparently it was 40% before the Vikings arrived 😯 More here https://www.iceland.org/geography/forest/

Made with
🔗 https://github.com/Lisa-Ho/30-day-map-challenge/blob/main/2023/Day14-forest-landuse-europe/forest-landuse-europe.ipynb

rye, to python
@rye@ioc.exchange avatar

Hi community I hve some very specific questions to ask about python but I don’t know how to ask them.

Is there anyone in this space who can donate an hour of mentoring time?

Thank you.

cazabon,

@rye

Some in particular use , which I used in the distant past. If memory serves, it could handle large datasets, but "large" today might be an entirely different order of magnitude. Are you talking billions of datapoints, that sort of thing?

What resource limit(s) are you running into? Memory for Jupyter, for your JS/browser Sankey tool? Something else? If Jupyter, have you increased the default memory limit?

2/x

LisaHornung, to python
@LisaHornung@fosstodon.org avatar

Day 4 – a bad map

A bit of a silly one for today. London borough polygons visualised in a tile grid map of London boroughs.

Made with

🔗 https://github.com/Lisa-Ho/30-day-map-challenge/blob/main/2023/Day4-london-boroughs/london-boroughs.ipynb

Excel template for a tile grid map available in the London Datastore https://data.london.gov.uk/dataset/excel-mapping-template-for-london-boroughs-and-wards

LisaHornung, to python
@LisaHornung@fosstodon.org avatar

Day3 – Polygons

Pubs in London per square km. Higher density in the center obvs but also some hotspots outside.

Data from . Made with .

🔗 https://github.com/Lisa-Ho/30-day-map-challenge/blob/main/2023/Day3-london-pubs/london-pubs.ipynb

If you want to know how to make this kind of fishnet grid for any polygon, I’ve documented the process a little bit in this notebook: https://github.com/Lisa-Ho/30-day-map-challenge/blob/main/2022/Day12/london-gridmaps.ipynb

jhilden, to random
@jhilden@vis.social avatar

Annoyed by this default behavior. The easy (easiest?) workaround is to change the year values to text strings, but I'd like the default tick locator to be a bit smarter about this.

jhilden, to Typography
@jhilden@vis.social avatar

I think it is a mistake that office software like Excel doesn’t support specifying relative font sizes

jhilden,
@jhilden@vis.social avatar

@henrik To be sure, the same issue holds for and as well.

Of course, you can fairly easily calculate your own relative size in those, but still. In most cases relative font sizes would be more foolproof for charts and graphics than absolute sizes in points.

villares, to python Portuguese
@villares@pynews.com.br avatar

explorando dados © contribuidores do

kellogh, to python
@kellogh@hachyderm.io avatar

oh wow! You'll be able to use from within and soon. And that Python install includes , and https://www.theverge.com/2023/8/22/23841167/microsoft-excel-python-integration-support

LisaHornung, to python
@LisaHornung@fosstodon.org avatar

Having fun with polar charts in ... still exploring the data but planning to share more soon 🤓

pixeltracker, to vscode
@pixeltracker@sigmoid.social avatar

Turn into a powerful code editor 🧑‍💻💫 for both and notebooks in just a few steps 💪🐍

🌎 https://www.fabriziomusacchio.com/blog/2022-11-06-vscode_for_python/#setting-up-vs-code-for-python

Stark9837,
@Stark9837@techhub.social avatar

@pixeltracker @guetto

For research projects where I use and , I actually like using ! It is just easier to run code and view my plots.

With , you can even have widgets like sliders and other stuff.

It just speeds up my prototyping and makes me more productive. Naturally, only my plotting code and math exist in the .ipynb, and the rest is just imported from normal .py files. Thus, it allows for quick conversions once the prototyping is done.

@Python

LisaHornung, to python
@LisaHornung@fosstodon.org avatar

Dessert - Ice cream parlours of Italy 🍨 🇮🇹

The most common shop name is simply “Gelateria” and about 1/3 of shops include “Gelateria” as part of their name.

Data from , made in + – full code here https://github.com/Lisa-Ho/small-data-projects#072023-gelaterias-of-italy

ruthpozuelo, to random
@ruthpozuelo@mastodon.social avatar

It is a vertical polar bar chart rather than a horizontal polar bar chart, but getting closer faster that I thought!

Btw, has anyone created a grouped horizonal/radial polar bar chart in ? I have some ideas on how to create it, but right now they all seem too complicated.

Oh, and the chart shows the status for Spain in 2023 if you are curious

ruthpozuelo,
@ruthpozuelo@mastodon.social avatar

Banging my head on how to curve text on polar charts for the dark grey outer ring 😬

finestructure, to swift
@finestructure@mastodon.social avatar

I had a hunch that I could take on tasks that I used to do with Python + matplotlib + Jupyter with Swift Charts + SwiftUI + Playgrounds instead. But I had no idea it’d be this nice and easy. Plus I find the default result better looking and I have much more control over everything around the chart, like labels, titles etc.

This will change everything for me when working with charts.

finestructure,
@finestructure@mastodon.social avatar

I've had more opportunities recently to create plots with / Swift Charts / playgrounds and the process absolutely holds up in replacing / / .

The dataset was larger this time, ~100k records, each containing a handful of data points, exported from a Postgres DB as JSON.

Massaging the data in a typesafe way is an absolute blessing – it's so easy to plot the wrong thing in python as you drill through three dicts.

Really happy with the results!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • anitta
  • thenastyranch
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • ngwrru68w68
  • megavids
  • magazineikmin
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • provamag3
  • tester
  • Leos
  • JUstTest
  • All magazines