Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
An (unofficial!) package for Datawrapper that allows you to interface between your pandas dataframes and Datawrapper locator maps, charts, and folders in Python.
Install using pip:
pip install datawrappergraphics
Datawrappergraphics uses Datawrapper's API to interface with Datawrapper. In order to use it, you need to generate an API token with the following permissions:
This token can be generated in settings > API-Tokens. There are three ways to authenticate:
DW_AUTH_TOKEN
.auth.txt
file in your project's root directory containing only your authentication key (don't forget to add this file to your .gitignore!).auth_token
arg.Once you've authenticated, you're good to go!
There are currently two main classes that can be implemented using this module:
Each of these classes inherits from the DatawrapperGraphic class, which is not meant to be implemented directly.
Classes can be implemented by using:
.. code-block:: python
import datawrappergraphics
chart_id = "AbBe1"
map = (Map(chart_id)
.data(aPandasDataframe)
.head("A cool headline for your chart")
.deck("A great looking deck, or subheadline, for your chart".)
.footer("This is a note")
)
Some simple usage patterns. Get started by importing the package:
.. code-block:: python
import datawrappergraphics as dwg
.. code-block:: python
dwg.Chart()
This will create a brand new chart by copying another chart. Useful if you've made a "template chart" and want to create a bunch of charts using different data based on that template.
.. code-block:: python
dwg.Chart(copy_id="AbCd1")
Data is uploaded as a pandas dataframe. Charts do not require any special columns, so go wild with it.
.. code-block:: python
dwg.Chart(chart_id="AbCd1").data(df)
The Map class is used to interact with locator map data. Your dataframe has to have a few required columns:
When you're uploading your data, you can specify a number of optional columns to control how your marker points show:
The names of all columns are case sensitive!
.. code-block:: python
dwg.Map(chart_id="AbCd1").data(df)
This is particularly useful if you're editing a large number of charts and want to iterate through charts in a folder.
.. code-block:: python
dwg.Folder(folder_id="12345").chart_list
FAQs
A package for interacting with Datawrapper maps, charts, and folders.
We found that datawrappergraphics demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.