How I automated boring stuff with Python

Hello everyone!
The title is actually a reference to a great book by Al Sweigart “Automate Boring Stuff with Python” which I recommend to everyone.

But I’m going to talk about how I did small automation in my non-profit organization.

I volunteer in AIESEC (we do intercultural exchanges and develop leadership in young people) and I’m one of the vice-presidents in a local office. Every week we have a meeting with all vice-presidents where discuss results, define the next steps and so on. That means we work with data, a lot of data.

One of our measures is the number of sign-ups on our website, where people can put different referrals (like Instagram, friends, university and so on). Every week our responsible for marketing had to look over a big table, compute the number of referrals in each category for that week, create a new sheet for that week, and fill in the sheet. It would take her 10-15 minutes and she was also prone to human errors.

I worked a couple of hours with gspread (a library to work with Google Sheets) and wrote a small script that runs once a week and does her work in a couple of seconds.

It seemed like magic to her but for me, it was just a few lines of code.

I’m very happy about the work and I’m ready to automate some other stuff we do regularly (and it’s boring)!

Happy coding everyone :smile:

9 Likes

Getting the opportunity to automate simple tasks like these is the most exciting part of coding, right? :heart_eyes:

Thanks for sharing this lovely story, Artur! :heavy_heart_exclamation:

1 Like

Hey @artur.sannikov96, I think this will be a great read if you expanded it into an article.

If you filled in the details of the task (with screenshots, if possible), a description of the gspread library and the code that you used, I believe it will be a very inspiring read for newcomers!

I encourage you to write that article. I would love to publish it in Dataquest Direct. :slight_smile:

Let me know if you need any help!

6 Likes

Hello @nityesh! It’s a nice idea, I just have to think about how to create some dummy data to work with (for privacy issues).

2 Likes

great article! I’ve done alot of this automation myself after taking the DQ training. It’s truly amazing!

But here’s the problem. All the automation is being done in my jupyter notebooks, so I have to run all the scripts at the end of the week & the month. Is there anyway for me to bundle the scripts and hand them off to my users who do not have python or jupyter?

1 Like

I run my scripts on Linux cron with installed Python. I’d say to explain to them how to schedule scripts. It’s now very difficult.

Great little article! I love a good technical walkthrough, a tutorial of new stuff and so on. But nothing beats a real life, down to earth good data story. With all the data stuff we do, good story telling is the end goal - and this is a great story.

2 Likes