• helloquiz logo
  • helloquiz logo
  • helloquiz
  • search
  • anki mode
  • your quizzes
  • account
  • docs
  • donate
  • Auto-importing data

    Map quizzes

    For map quizzes, you can automatically import data from the geojson that the quiz belongs to:

    Automatic import menu for map quizzes

    This will import data based on the features of each geojson. For example, if you have a geojson file whose features contain information about phone codes in a property called AreaCode, you can just enter AreaCode in this form, and the quiz will automatically import the correct codes. In particular, for currently existing quizzes, most phone code and post code quizzes will have AreaCode as their feature names, while most subdivision quizzes will have NAME_{n} where {n} is the level of subdivision (i.e. for Germany, NAME_1 is the state, and NAME_2 is the Landkreise).

    By default, the auto-import feature overwrites all existing questions. If you don't want this to happen, you can uncheck the corresponding checkbox, in which case new questions will be added.

    Additionally, if you only want a smaller subset of the map, you can either select shapes manually, or filter based on geojson property.

    If you want to select shapes manually, change the edit mode to "included shapes" in the menu below, and click on the shape that you want to include-exclude - included shapes are highlighted in purple, while excluded shapes are shown using the default map colour.

    Edit mode menu

    Alternatively, if you want to automatically decide what shapes should be included, you can use the filter menu:

    Filter menu for map quizzes

    Here, you can filter using three methods:

    • Comma-separated values: for instance, if you want to make the quiz only apply to area codes 65, 66, and 67, you can enter 65,66,67 as the value, and select comma-separated as the filter type.
    • Regex: if you want a more complex filter, you can use regular expressions. For instance, if you want the quiz to apply to all area codes that start with a 6, you can enter ^6.*$ as the filter value. These can be slightly complicated to construct, so I recommend reading this page to learn how to create regular expressions, and this page to check your regex before using it.
    • Starts with: here, you can set all shapes whose value starts with a certain string. For instance, if you want all area codes that start with a 6, you can enter 6 as the value.

    Language quizzes

    Placename data for languages quizzes can be imported from Wikidata using this form:

    Automatic import menu for language quizzes

    This form requires the Wikidata code in multiple places. You can find this right next to the title once you navigate to a Wikidata page:

    Wikidata code location

    In this example, the Q884 right next to "South Korea" is what you are looking for.

    You should input the following values for the form:

    • 2-letter language code: the ISO 639 code for the language you want to create the quiz for. Some examples would be ar for Arabic, ru for Russian or gu for Gujarati - you can find a full list of codes here.
    • Wikidata country codes: the code(s) for the Wikidata entries of each country, separated by commas in case you want multiple countries. For instance, since this is South Korea's entry, and this is North Korea's, you would enter Q884,Q423 if you wanted to include placenames from the two Koreas.
    • Wikidata subdivision codes: optionally, if you only want to import data from certain subdivisions (i.e. you are making a Gujarati language quiz, so you only want placenames in Gujarat), you can enter the desired subdivisions' Wikidata code here (comma-separated). For instance, if you only want to include Gyeonggi, you would enter Q20937. If you want to import data from the entire country, leave this field empty.
    • Wikidata place types: the code(s) for what kind of places you want to retrieve from Wikidata. As the description states, the form is auto-populated with some place types that generally tend to be quite good to use all around the world, but you may find it useful to include some additional ones. For example, in the case of South Korea, "city of South Korea", "eup" and "myeon" may be useful entries to include.
    • Check transcription accuracy: if you have this turned on, the code will automatically reject "inaccurate" transcriptions. For most languages, this is good, but there are a select few examples where the automatic transcription checks are actually a negative, rather than a positive - examples include Thai or Japanese. If you are unsure whether to keep this on, check this page or try running the import with the setting on, and turn it off if you dislike the results.
    • Text replacement: sometimes, the data includes unnecessary text, such as information about what type of entity it is. As an example, the names for Korean places may include "-eup" or "읍" (roughly corresponding to "town") unnecessarily. This option lets you remove these using two possible methods:
      • Comma-separated: just list out what text you want removed, separated by a comma (important: don't put a space after the comma unless you want the space to be included in the replaced text). For the previous example of replacing -eup and 읍, you would put -eup,읍.
      • Regex: if you want a more complex filter, you can use regular expressions. For instance, if you want to remove everything after a -, you can enter \-.*$ as the filter value. These can be slightly complicated to construct, so I recommend reading this page to learn how to create regular expressions, and this page to check your regex before using it.
    • Overwrite existing questions: by default, the import overwrites previously added questions. If you want to change this behaviour, uncheck this box.

    For developers