Code Monkey home page Code Monkey logo

amckenna41 / iso3166-2 Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 1.85 MB

A lightweight Python package, and accompanying API, that can be used to access all of the world's most up-to-date and accurate ISO 3166-2 subdivision data, including: name, local name, code, parent code, type, latitude/longitude, flag and more.

Home Page: https://iso3166-2-api-amckenna41.vercel.app/

License: MIT License

Python 100.00%
api countries geographic-data geonames iso3166 iso3166-2 json python regions world-data

iso3166-2's Introduction

Hey there, AJ here 🀘

I'm a Software Developer, published AI researcher and Master's of Computer Science graduate from Belfast, Ireland πŸ§‘β€πŸ’».

πŸ“ Recent projects

  • πŸ“š pySAR - my Master's Thesis was within the field of Bioinformatics, studying the effect mutations can have on the fitness/activity of different proteins/enzymes using Machine Learning and Digital Signal Processing techniques, building a Python Software package called pySAR. I got this research paper published within the Journal of Biomedical Informatics, and is available here.
  • 🌎 iso3166-flag-icons - a verbose dataset of over ~3500 country and regional flags, a unique collection that is not easily available across any platform, including GitHub.
  • 🌎 iso3166-2 - a Python application and accompanying API that stores up-to-date, reliable and accurate data for each region across the world, according to the ISO 3166-2 standard, making any region's data accessible via a single command.
  • 🌎 iso3166-updates - a Python package and accompanying API that pulls all the latest updates for the ISO 3166 standard, taken directly from the ISO themselves, which ensures that the aforementioned projects are accurate and up-to-date.
  • 🧬 protpy - a Python package for calculating a range of protein descriptors using their physicochemical, biological and structural properties. Built alongside and for use in pySAR.
  • 🧬 aaindex - a Python package for working with the various datasets of the AAIndex database (https://www.genome.jp/aaindex/). Built alongside and for use in pySAR.
  • πŸ”­ DCBLSTM_PSP - a similar Bioinformatics project to pySAR, predicting the secondary structure of proteins using their initial sequence, making use of deep learning and neural networks.
  • πŸ“• pyWikiCommons - a Python package for downloading images and videos from Wikimedia Commons - based on now outdated Python 2 scripts.
  • 🧠 izhikevichSpikingNeuron - implementation of the Izhikevich Spiking Neuron model using Simulink and Xilinx tools.
  • πŸ‘― Looking to collaborate on any data science, machine learning and or bioinformatics related projects.

βš™οΈ Recent GitHub activity

amckenna41










πŸ‘¨πŸ»β€πŸ’» Β Languages

⚑ Tools and Technologies:

🎧 Currently vibing to

Spotify

πŸ“¬ Connect with me

github linkedin insta mail mail spotify letterboxd github


iso3166-2's People

Contributors

amckenna41 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

iso3166-2's Issues

The ISO3166_2.__doc__ usage appears to be out of date

The docstring mentions

from iso3166_2 import * 

#get ALL subdivision data for ALL countries
all_subdivisions = ISO3166_2()

#get ALL subdivision data for Lithuania, Namibia, Paraguay and Turkmenistan
lt_subdivisions = ISO3166_2("LT")
na_subdivisions = ISO3166_2("NA")
pry_subdivisions = ISO3166_2("PRY")
tm_subdivisions = ISO3166_2("795")

#get subdivision names, local names, types, parent codes, flag urls and lat/longitudes 
#   for GB-ANS, GB-BPL, GB-NTH, GB-WGN and GB-ZET subdivision codes for the UK
gb_subdivisions = ISO3166_2("GB")

gb_subdivisions['GB-ANS'].name
gb_subdivisions['GB-BAS'].localName
gb_subdivisions['GB-BPL'].type
gb_subdivisions['GB-NTH'].parentCode
gb_subdivisions['GB-WGN'].flagUrl
gb_subdivisions['GB-ZET'].latLng

#get list of all subdivision codes for Botswana
bw_subdivisions = ISO3166_2("BW")
bw_subdivisions.subdivision_codes()

#get list of all subdivision names for Japan
jpn_subdivisions = ISO3166_2("JPN")
jpn_subdivisions.subdivision_names()

#adding custom Belfast province to Ireland
all_subdivisions = ISO3166_2()
all_subdivisions.custom_subdivision("IE", "IE-BF", name="Belfast", local_name="BΓ©al Feirste", type="province", lat_lng=[54.596, -5.931], parent_code=None, flag_url=None)

#searching for the Monaghan county in Ireland (IE-MN) - returning exact matching subdivision
all_subdivisions = ISO3166_2()
all_subdivisions.search("Monaghan")

#searching for any subdivisions that have "Southern" in their name, with a likeness score of 0.8
all_subdivisions = ISO3166_2()
all_subdivisions.search("Southern", any=True, likeness=0.8)

Well a few of these things simply don't work.

For example

>>> gb_subdivisions = ISO3166_2("GB")
>>> gb_subdivisions['GB-ANS'].name
*** ValueError: Invalid alpha-2 code input: GB-ANS.

Helping out with typing?

Hi - Sorry, to raise this as an issue, but there's no discussions at the moment.

I'd like to help out with adding typing to this, but I'm not quite sure of the state of the project and things which might need to be addressed first.

  • Should the testing be passing?
  • Any opposition to improving the GHA workflows?
  • Any opposition to moving more items into pyproject.toml?
  • Looking forward, there may be some breaking changes required to help improve the typing, things like making the __init__ an actual list or string and not accepting a comma separated list of string comes to mind

Outstanding flags in SVG

Placeholder repo Issue that aims to acquire all ISO3166-2 flags in SVG format. Several subdivision flags were found to not have any readily available versions of their flags in SVG format and are in png/jpg/gif format.

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.