This task will give you practice
- making sense of an unfamiliar API using its documentation
- handling, transforming and combining data, and coming up with data structures that enable you to present it easily
- dealing with interdependent API responses that complete in an arbitrary order, and ideally presenting progressively more information to the user as more data becomes available
Focus on logic and clean understandable code rather than visual design.
- Create a page that lists current set of municipality codes and names.
- Link to the municipality's homepage if available.
- Use the API at https://municipaldata.treasury.gov.za/.
Set your git repository up to automatically deploy changes on vercel
Show a loading state until the municipality data has loaded and municipalities can be shown.
Group municipalities by province. Show a heading for each province name.
- Add each municipality's Audited Actual Cash Balance to the page for the 2020-2021 financial year beside its name.
- The municipality's name should show so long once available, even if the cash balance data has not loaded yet.
- If the Cash Balance data is available before municipalit names, wait for them to load before showing anything other than the main loading state.
- Show a loading state in the cash balance value container to indicate to the user that the data is still loading.
- Use the cash balance example at https://municipalmoney.gov.za/profiles/municipality-NC074-kareeberg/ to find the correct value to fetch from the API
Use the demarcation_changes
cube to identify disestablished municipalities and exclude them from the page.