nmtan2001 / dvhcvn-explore

Interactive text-based program that explore data of administrative units of Vietnam

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Administrative units of Vietnam explore

Description:

This interactive text-based program enables users to explore and delve into the administrative structure of Vietnam. As well as see the how many units that have the same levels. Data is taken from dvhcvn. Data is updated from the Administrative Directory page of the General Statistics Office and the Administrative Map System of the Government Electronic Information Portal.

Key Features:

  • Administrative Unit Navigation: Seamlessly navigate through the three levels of administrative divisions: provinces, districts, and communes.

  • Unit Statistics: Gain insights into the administrative hierarchy by accessing statistics on the number of child units within each current unit.

  • Unit Level Count: Discover the distribution of administrative units across different levels, providing a comprehensive overview of Vietnam's administrative structure.

  • Data Visualization: Enhance understanding with interactive data visualizations that represent the hierarchical relationships between administrative units.

Commands:

There will be some commands that you can perform at each stages:

  • e (Explore): Input the next level unit you want to explore (City -> District -> Commune)
  • l (List): Lists all the child units of the parent unit (Cities -> Districts -> Communes)
  • s (Statistics): Statistics about the current selected unit (Country -> City -> District)
  • q (Quit): Quit the program

Brief explanation:

Functions:

  • get_country: Create a dictionary out of the JSON file taken from dvhcvn

  • remove_diacritics: Remove all the diacritics of a word/phrase using RegEx

  • get_city/get_district/get_commune: Take the required unit based on the parents

  • list_city/list_district/list_commune: List all the child units based on the parents

  • total/data_explore/stat_city :Perform calculations to get statistics

  • bold : Make the required phrase bold

  • intro/run: Control the flow of program

Libraries:

  • pytest:Perform unit tests on functions
  • colorama: give colors to prints

About

Interactive text-based program that explore data of administrative units of Vietnam


Languages

Language:Python 100.0%