Dev Space

Customize and extend the power of Alteryx with SDKs, APIs, custom tools, and more.
SOLVED

Python Tool Challenge | BUILD a Python tool and win a prize!

NeilR
Alteryx Alumni (Retired)

Python Tool Challenge

 

With the release of Alteryx Designer 2018.2, the Python SDK has finally shed its Beta flag!

 

 grown_up.png

 

Now it's time to celebrate!


To enter the contest:

  1. Create a Python tool (like Nick did) and package it as a YXI file.
  2. Reply to this thread with a description of your tool. Don't forget to link to or attach your YXI.
  3. Get stars! Threaten, bribe, or maybe just tweet. Whoever gets the most stars by July 31st wins!

You'll have to make a decision: keep working on your tool closer to the deadline to make it as perfect as possible, or submit it early so you have time to socialize your post to get as many stars as possible?


Grand prize hotnessGrand prize hotness

☝️☝️☝️ The winner will receive a custom WASD mechanical keyboard 🌋🌋🌋

👇👇👇 All entrants will be rewarded with the Python Contest badge 🔥🔥🔥

 

Participation trophy (Community badge)Participation trophy (Community badge)

Remember to make sure you've upgraded to 2018.2.

 

Subscribe to this thread or check back here (pythoncontest.alteryx.com) to vote as new tools are submitted!


35 REPLIES 35
NeilR
Alteryx Alumni (Retired)

I'm itching to get this party started. Here is the Word Cloud tool that @NickJ used during his Inspire 2018 product keynote demo. First open the yxi file with Alteryx Designer 2018.2 to install the tool. Then check out the sample for an example usage. Rock on!

rock on.png

[Alteryx employees can post their tools here, but will not contend for the keyboard :) ]

SophiaF
Alteryx
Alteryx

Can I just say I am SO JEALOUS of the keyboard!! While I'm not able to qualify for it, here's my very first tool developed with the Python SDK!

 

 

 

VJNekmz

 

This tool the Python package Mimesis to generate dummy data for testing purposes. The tool as an optional input, so users can either create a completely new data source, or append dummy data to existing fields. There is also Locale option that will generate data that is appropriate for the language or country associated with that locale.

 

 

Here's a small demo:

 

2rDQRIf

 

 

Thinking forward to v2 - I'm looking to make the following changes:

 

1. Restrict the numeric spinner to positive numbers

2. Output fields in more appropriate data types - currently everything outputs as a string

3. Possibly read in the Lat/Lon field as a spatial object instead?

4. Add in the progress percentage for downstream tools

 

Any other suggestions/feedback are highly appreciated (and sought after) :)

 

 

Big thanks to @PaulN for his massive amounts of help and @NickJ for his blog post that kick-started it all!

 

 

Pick up the latest release here: Github download

Sophia Fraticelli
Senior Solutions Architect
Alteryx, Inc.
PaulN
Alteryx Alumni (Retired)

Hey,

 

Just a little basic tool to generate spatial objects from GeoJSON -Alteryx Engine "little secret" to handle spatial objects- code. 

 

As current version of Python SDK doesn't support spatial objects, I thought it could be interesting to find a workaround. More details to follow in another post...

 

Examples:

 

Full GeoJSON file:

 

geojson_1.png

 

 

 

Result: 

 

geojson_1_result.png

 

 

 

 

 

Partial GeoJSON file:

 

geojson_2.png

 

Primitive only:

geojson_3.png

 

 

 

Error:

geojson_error.png

 

 

 

 

Special thanks to @SophiaF@SydneyF@JessicaS@HenrietteH and anyone unjustly forgotten,

 

 

PaulN

 

 

 

tlarsen7572
11 - Bolide
11 - Bolide

Are we allowed to post more than 1 tool?  I am working on a second tool which I would be interested in submitting...if I ever finish it.

 

I created a modest custom tool with Python to extract regex matches out of fields of text.  You provide a pattern to the tool, tell it which field to search, and it will extract every occurrence of text that matches the pattern.  Think of it like the Regex Parse tool, but instead of parsing into columns, each match parses into a new record.

 

Link to download the YXI and example.

NeilR
Alteryx Alumni (Retired)
@tlarsen7572 you are allowed to post up to 100 tools.
Nate1
8 - Asteroid

First I want to give a shout out to @NeilR and @NickJ for the blog post they wrote. I am not really a developer so those blogs got me started and I wouldn't have been able to build this without them. For anybody considering building a tool who has limited python experience like I do, Nick's blog make it very easy to follow step by step exactly what you have to do. 

 

As for the tool I built, I decided to use the Vader Sentiment python package and wrap in an Alteryx tool. It scores a text field into positive, negative, and neutral scores from the words and phrase in it. 

 

Output_example.JPG

Nick612Haylund
10 - Fireball
10 - Fireball

Taking the advice of @NeilR and submitting my unfinished tool EARLY so I have time to socialize it, but more importantly, see if anyone wants to partner up on finishing it with me :)

 

I went a slightly different route by trying to recycle some python code developed some months back to scrape Glassdoor review data (with their permission.) Unfortunately, I can't get passed the finish line on this tool without getting the input/output portion of the python code nailed down. So the caveat to using the tool today is that to pick a company, and land the data...you have to update the variable in the python script (line 13,[filenameExcel]) for it to reference a location (where the tool is unpackaged). Not fun - which is why I'm hoping to coerce someone(s) into getting that bit figured out :) 

 

scriptLine.PNG

sample.PNG

 

So, not even a beta...but an "alpha" is attached, and if interested, you can see how it works with a sample company. I will also take the advice of bribing...so if I can get some help on this, I'll add few dozen companies to the picklist...and if we get some good stars from that finished product/this...i'll add a couple hundred! It's doable - and the resulting dataset is super fun to play with (per below)

 

glassdoorTableau.gif

 

In the meantime, I'll keep chuggin' along on this, as it was a really fun process to dig into. Thanks @NickJ for the great background, and @PaulN & @StephenW for the direction! Can't wait to see what others come up with!

 

Nick

 


 

***UPDATE (2018-07-19)***

Glassdoor Company Review Scraper (BETA) is complete! HUGE shoutout to @tlarsen7572 for taking it the last 10 (20...30?) yards! You can download the package and start using it today :)

 

Sidebar:

The best part of this contest was collaborating on a pythonSDK project with others!
   A) bc there's no way I would have completed this in the coming weeks without the help...but also,
   B) finding dev community members that were so quick and willing to dig in and solve problems together!

 

Chatting with @tlarsen7572 and @Nate1 about this very topic, and in doing so, came up with the idea that of a future PythonSDK internal user group... @LaurenU :)

 

To the above point, we also chatted about how there's opportunity out there for better means to communicate (quickly/collaboratively) in community. For now, @Nate1 set up a Slack channel so we could discuss the additional work to be done on this project. If anyone is interested in joining that conversation, the link is below! Or, let us know the best way to go about that.

 

Cheers for the fun challenge Alteryx!
Nick

 

Alteryx_Python Slack Workspace

tlarsen7572
11 - Bolide
11 - Bolide

I was tempted to accept the 100 tool challenge, but my family wants to see me this month.

 

Another tool for the contest!  I am very....particular...about structuring my work, to the point where I have specific styling and spacing guidelines for my workflows.  This...attention to detail...also extends to the structure of the data I output.  In short, it really, really bothers me when columns are not organized properly.  I have been getting frustrated with the traditional Select tool, so I decided to create my own field sorter tool that would exhibit the following characteristics:

 

  1. Allow fields to be resorted easily.
  2. Sorting can be based on exact field names or by matching a regex pattern
  3. Fields matched by a pattern can be sorted either alphabetically or in the original source order
  4. Changes to the incoming field list will NOT affect the sort configuration of the tool

Last week I created a Python tool to accomplish those objectives.  It is 'skinned' with a React web app.  I have started using it in production and feel more at peace with the world, so I thought it would be worth sharing.

 

Download link

 

Demo:

Treyson
13 - Pulsar
13 - Pulsar

@SophiaF I like many thing about this, but really like the subtle Pokemon reference.

 

mrmime.png

Treyson Marks
Managing Partner
DCG Analytics