area_code_test.py 614 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
"""Tests area codes"""

import pytest


def test_url():
    from covid.data import AreaCodeData

    config = {
        "AreaCodeData": {
            "input": "json",
            "address": "https://services1.arcgis.com/ESMARspQHYMw9BZ9/arcgis/rest/services/LAD_APR_2019_UK_NC/FeatureServer/0/query?where=1%3D1&outFields=LAD19CD,FID&returnGeometry=false&returnDistinctValues=true&orderByFields=LAD19CD&outSR=4326&f=json",
            "format": "ons",
            "output": "processed_data/processed_lad19cd.csv",
            "regions": ["E"],
        },
    }

    df = AreaCodeData.process(config)

    print(df)