Skip to content

Instantly share code, notes, and snippets.

@pablomoniz
Last active January 22, 2021 11:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save pablomoniz/6ddcc22aac5cc7111d0ba92f18d881f9 to your computer and use it in GitHub Desktop.
Save pablomoniz/6ddcc22aac5cc7111d0ba92f18d881f9 to your computer and use it in GitHub Desktop.

Warming up with two support tickets:

Ticket #1

Hi folks, I wanted to add interactivity to my map, but for some reason I can't make my popups work. What am I doing wrong? Please find my code here. Thanks! Please find my code here, and a live version here. Thanks!

Ticket #2

Hello Support, I'm going through your materials, I've seen this query somewhere, and I'd need some help from your side on understanding what it does, can you give me a hand?

      SELECT e.name,
             count(*) AS counts,
             sum(p.population) as population
        FROM european_countries e
        JOIN populated_places p
          ON ST_Intersects(p.the_geom, e.the_geom)
    GROUP BY e.name

Python Support Engineer Test - Sample creation

A customer would like to host and provision 10 row data samples to their clients and, since some source data would be geospatial, has decided to use CARTO for this purpose and would like a CARTO Support Team to help with that.

Goal:

Develop an ETL routine that reads a CSV or geospatial dataset, limits the results to 10 rows and then uploads it to a CARTO account.

The routine can be created in a .py script or Notebook format such as Jupyter Notebook.

Code efficiency, style and explanation will be evaluated.

Materials:

Sample dataset: https://data.cityofnewyork.us/Education/NYC-School-District-Boundaries/p5vh-vm7p

Steps for creating a free CARTO account here

Resources

You can use any documentation available.

TIP: Within our Developer Center CARTOframes page you can find some potentially useful resources: https://carto.com/developers/cartoframes/

In addition, here you can find specific useful links:

https://carto.com/developers/cartoframes/guides/Authentication/

https://carto.com/developers/cartoframes/guides/Data-Management/

https://carto.com/developers/cartoframes/examples/#example-upload-to-carto 👀

https://carto.com/developers/cartoframes/reference/

Bonus Track [100% OPTIONAL]

Create a routine that reads and uploads a CSV dataset into CARTO in chunks of approximately 100 MB.

Additional resources:

https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_csv.html

CARTO On-premise exploration

There is a CARTO on-premise installation that you can connect to using the following command:

ssh -p 22022 -i support_candidate_test_rsa centos@support-engineer-test.carto.solutions

The support-test-rsa.pem key is available here.

For this test, you'll need to log in to the server and find the following information about the installation: RPM packages related to CARTO that are installed on the system. Directories that hold CARTO software, data and/or configuration files. CARTO services/processes running on the system and the ports where they're listening.

Important notes: (1) the full test can be completed without modifying anything in the system configuration. If you accidentally break something, don't worry, but please get in touch with HR, so we can restore the system. (2) command history is disabled: take this into account in case you want to save any command

BONUS TRACK [100% OPTIONAL]

The 443 port is closed to the world, but you'll get extra points in the test if you manage to access the web application from your browser :) Some tips in case you want to try: The application is configured to work under the "carto.lan" domain name. User: carto Password: location

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment